
Two work areas - text header and line table - must be prepared for a text module, which is to be processed in an application using SAPscript. These work areas must be initialized when a text is created or the READ_TEXT or READ_TEXT_INLINE was terminated with an exception.
The text header and line table can also be reused, if the text currently processed with it has been saved or is no longer required.
The text module must be specified fully with entries in the fields OBJECT, NAME, ID, and LANGUAGE. Generic entries are not allowed.
After calling INIT_TEXT, the header contains initial values and the lines table is empty.
Function call:
CALL FUNCTION 'INIT_TEXT'
EXPORTING
ID = ?...
LANGUAGE = ?...
NAME = ?...
OBJECT = ?...
IMPORTING
HEADER =
TABLES
LINES = ?...
EXCEPTIONS
ID =
LANGUAGE =
NAME =
OBJECT =
Export parameters:
|
OBJECT |
Enter the name of the text object allocated to the text. Table TTXOB contains the valid objects. Reference field: THEAD-TDOBJECT |
|
NAME |
Enter the name of the text module. The text name can be up to 70 characters long. Its internal structure depends on the text object used. Reference field: THEAD-TDNAME |
|
ID |
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object. Reference field: THEAD-TDID |
|
LANGUAGE |
Enter the language key of the text module. The system accepts only languages that are defined in table T002. Reference field: THEAD-TDSPRAS |
Import parameter:
|
HEADER |
This parameter returns the initialized text header. Structure: THEAD |
Table parameters:
|
LINES |
All lines of the specified text lines table are deleted. 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 |
The parameter LANGUAGE contains a text language key that is not defined in table T002. |
|
NAME |
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions. Possible errors:
|
|
OBJECT |
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB. |