
SAVE_TEXT writes a text module back to the text file or the text memory, depending on the storage mode of the corresponding text object.
The module can be used to change existing texts and to create new texts. If it is clear that it is a new text, this can be specified via the parameter INSERT. The result is better performance as a test read is not performed.
If the lines table passed with the function module is empty, the system deletes the text from the text file.
Function call:
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = ?...
INSERT = SPACE
SAVEMODE_DIRECT = SPACE
OWNER_SPECIFIED = SPACE
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = ?...
EXCEPTIONS
ID =
LANGUAGE =
NAME =
OBJECT =
Export parameters:
|
CLIENT |
Specify the client under which to store the text. If you omit this parameter, the system uses the current client as default. Reference field: SY-MANDT Default value: SY-MANDT |
|
HEADER |
Enter the structure that contains the text header of the text you want to save. Structure: THEAD |
|
INSERT |
This parameter indicates that the text module is new. Normally SAPscript reads the text file to check whether the text module is new. If this is already known in the calling program, the test read can be suppressed by the parameter and the performance therefore improved. Possible values:
Default value: SPACE |
|
SAVEMODE_DIRECT |
The save mode of a text module (direct, update) is defined via the table TTXOB with the text object. However, it may be necessary to replace storage in update task with direct storage of a text (for example, for background processing). Possible values:
Default value: SPACE |
|
OWNER_SPECIFIED |
When a new text is created, this parameter determines whether the information in the text header regarding the first creation is set automatically by SAPscript or whether the data passed in the header is to be used. The fields involved are TDFUSER, TDFDATE, TDFTIME, and TDFRELES in the text header. Possible values:
If this option is activated and one of the fields listed above is initial, this field is still filled by SAPscript. Information taken from header If you use this parameter, but one of the required fields is initial, this field is filled by SAPscript. You use this parameter if you use a program to insert text under a certain owner or a certain release information, which do not correspond to the current environment (for example, a migration program for transferring texts from the R/2 system to SAPscript). Default value: SPACE |
Import parameter:
|
FUNCTION |
The parameter returns the processing status of the text module for the current call. Possible values:
|
Table parameters:
|
LINES |
The table contains the text lines of the text to be saved. Structure: TLINE |
Exceptions:
|
ID |
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there with the text module object. |
|
LANGUAGE |
Field TDSPRAS of the text header contains a language key that does not exist in table T002. |
|
NAME |
The name specified in field TDNAME of the text header does not match the SAPscript conventions. Possible errors:
|
|
OBJECT |
The parameter TDOBJECT contains the name of a text object that does not exist in table TTXOB. |