To re-transfer texts from the internal work areas to the text file, use the function module SAVE_TEXT.
The application program does not know whether the text is new or a changed version of an existing text. To be able to find this out, the program must read the text file first.
If a text exists, the transferred text lines overwrite the old version. If it does not exist, the system creates it. If you know from the beginning that the text is new, you can suppress this read process using the parameter INSERT and thus improve performance.
A text you want to store in the text file must consist of at least one line whose paragraph format or line contents is unequal to SPACE. Otherwise the system automatically deletes this text from the text file.
Changes to the text file are valid at once if the text object of the text is set to direct storage. If it is set to storage in update task, the text changes are temporarily stored in the text memory. The function module COMMIT_WORK then transfers them to the log file, from where they are updated with the next COMMIT WORK.
The function module SAVE_TEXT can handle only texts that are eventually stored in the text file, that is, text with storage mode 'D' or 'V'.