Start of Content Area

Process documentation Reading Texts  Locate the document in its SAP Library structure

You can process texts only if they are stored in the internal work areas of the program. Therefore, you must first transfer a text into the work areas.

To transfer the text header of a text into the specified structure and the text lines into the specified lines table, use the function module READ_TEXT.

Usually, the system reads a text from the text file. However, for texts with storage in the update task, the system first looks into the text memory to see whether it contains a currently processed version. If so, the system reads this version of the text into the work area, otherwise the text version from the text file.

To read a text version stored in the archive, use the parameter ARCHIVE_HANDLE.

If the desired text does not exist, READ_TEXT ends with the exception NOT_FOUND. The contents of the work areas for text header and text lines are then undefined. To be able to use these work areas for another text, you must first initialize them with INIT_TEXT.

The function module READ_TEXT also handles text references. It reads the reference chain to its end and supplies the text lines of this text in the lines table as well.