This function module calls the fullscreen editor. You can use the editor functions to edit the text lines. The system sets the editor interface according to the interface specification in the text object.
Usually, the system implicitly calls the function module SAVE_TEXT if you leave the editor choosing Save, provided the text is stored in the text file according to the allocated text object. To deactivate this call, use the parameter SAVE.
If the field TDFORMAT in the text header contains SPACE, the system calls the SAPscript Editor. Otherwise, it calls the function module EDIT_TEXT_FORMAT_xxx where xxx is the contents of the field TDFORMAT. This function module then calls the editor required for the specified text format. Which of the parameters passed with EDIT_TEXT the system evaluates, depends on this interface module and the called word processing program.
Function call
EXPORTING
DISPLAY = SPACE
EDITOR_TITLE= SPACE
HEADER =
SAVE = 'X'
CONTROL = SPACE
PROGRAM = SPACE
IMPORTING
NEWHEADER =
FUNCTION =
RESULT =
TABLES
LINES =
EXCEPTIONS
ID =
LANGUAGE =
LINESIZE =
NAME =
OBJECT =
TEXTFORMAT =
COMMUNICATION=
Export parameters
DISPLAY |
The parameter indicates whether the text editor is called in display or in change mode. In display mode, the user cannot edit the text. Possible values: 'X' display mode ' ' change mode Default value: SPACE |
EDITOR_TITLE |
The system displays the title specified here in addition to the other headings generated by SAPscript in the title bar of the text editor window. Thus you can set any title text in the editor. This allows you to decrypt complicated technical text names to display them in the title bar. Reference field: TTXIT-TDTEXT Default value: SPACE |
HEADER |
Enter the structure that contains the text header of the text to be edited. Structure: THEAD |
CONTROL |
Use this parameter to set certain attributes of the SAPscript editor. The attributes are described in the fields of structure ITCED. Structure: ITCED Default value: SPACE |
SAVE |
Use this parameter to determine whether the system calls SAVE_TEXT after saving the text in the editor. If you want to suppress this call, the application program must later on call the function module SAVE_TEXT itself. In both cases, the system returns the changed text lines to the application program. Possible values: 'X' call SAVE_TEXT ' ' suppress SAVE_TEXT Default value: 'X' |
PROGRAM |
Use this parameter to determine the program whose work areas the system uses to replace the values of the program symbols. If you omit this parameter, the system uses the first program called to search for the field values (SY-CPROG). Reference field: SY-REPID Default value: SPACE |
Import parameters
NEWHEADER |
Return parameter for the text header. Due to certain operations in the editor also fields in the text header are changed. Structure: THEAD |
FUNCTION |
Return parameter for the processing status of the text module for the current editor call. Possible values: ' ' no action 'I' text module created 'U' text module changed 'D' text module deleted |
RESULT |
The SAPscript Editor uses this parameter to return status information to the calling program. The information is described by the fields of structure ITCER. Structure: ITCER |
Table parameters
LINES |
Contains a table with the lines of the text module. Structure: TLINE |
Exceptions
ID |
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module. |
LANGUAGE |
The language key specified in the parameter LANGUAGE of the text header is not defined in table T002. |
LINESIZE |
The field TDLINESIZE of the text header contains a line width less than 0 or greater than 132. |
NAME |
The parameter NAME of the text header contains the name of a text module, which does not correspond to the SAPscript conventions. Possible errors:
|
OBJECT |
The parameter OBJECT in the text header contains the name of a text object, which is not defined in table TTXOB. |
TEXTFORMAT |
The text lines passed to the function module have a format, which cannot be processed by the current environment. The format is stored in the text header in the field TDTEXTTYPE. Possible reasons:
|
COMMUNICATION |
The field TDTEXTTYPE of the text header is not empty, that is, it contains a text format which requires an external word processing program to be called. When calling this program, an error occurred. Possible reasons:
When processing texts in a non-SAPscript format, the system internally calls the function modules EDIT_TEXT_FORMAT_xxx or PRINT_TEXT_FORMAT_xxx, where xxx is the contents of field TDTEXTTYPE. These function modules ended with the exception COMMUNICATION. SAPscript passes this message to the print program without any further analysis. |