
Use this function module to copy texts. You can copy only texts that exist in the text file.
The function COPY_TEXTS requires the text keys of the texts to be copied and the text keys of the target texts. You use table TEXTS to pass these values to the function module.
The system then copies the texts in blocks without first passing them to the text work areas.
After the function module is finished, you can read the result for each text in the field SUBRC of table TEXTS.
This function works much faster than the following copy procedure:
Read the text you want to copy using READ_TEXT.
Enter text key for target text in header
Save text module under the new name using SAVE_TEXT.
Function call:
CALL FUNCTION 'COPY_TEXTS'
EXPORTING SAVEMODE_DIRECT = ' '
INSERT = ' '
IMPORTING ERROR =
TABLES TEXTS = ?...
Export parameters:
|
SAVEMODE_DIRECT |
You determine the storage mode of a text module (direct, in update task) via the text object in table TTXOB. However, it may be necessary to replace storage in update task with direct storage of a text (for example, for background processing). Possible values:
|
|
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:
|
Import parameter:
|
ERROR |
This parameter indicates whether an error occurred during copying. Possible values:
This error flag only indicates that an error occurred copying a text. Further information can be obtained from the field SUBRC in table TEXTS. |
Table parameters:
|
TEXTS |
This table contains the texts to be copied. A copy function can be called per table line. The complete text key of the source text and target text must be specified. Generic entries are not allowed. After finishing the copy process, the field SUBRC contains for each text the return value of the copy process. Possible values of SUBRC:
Structure: ITCTC |