Start of Content Area

READ_REFERENCE_LINES   Locate the document in its SAP Library structure

If you did not include the text lines of the reference texts into the REFER_TEXT function module, you can use READ_REFERERNCE_LINES to read them at a later time.

 

Function call:

 

CALL FUNCTION 'READ_REFERENCE_LINES'

EXPORTING HEADER = ?...

IMPORTING NEWHEADER =

TABLES LINES = ?...

EXCEPTIONS ID =

LANGUAGE =

NAME =

NOT_FOUND =

NO_REFERENCE =

OBJECT =

REFERENCE_CHECK =

 

Export parameters:

HEADER

The field contains the text header of the text that contains the reference to another text. The system reads the lines of the text specified in the fields TDREFOBJ, TDREFNAME, and TDREFID and stores them in table LINES.

Structure: THEAD

 

Import parameters:

NEWHEADER

Contains the modified text header. The structure specified here is usually the same as the structure passed with the parameter HEADER.

Structure: THEAD

 

Table parameters:

LINES

LINES contains all text lines of the reference text.

Structure: TLINE

 

Exceptions:

ID

The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.

LANGUAGE

The parameter LANGUAGE contains a language key that does not exist in table T002.

NAME

The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.

Possible errors:

  • The field contains only blanks.
  • The field contains the invalid characters ‘*’ or ‘,’.

OBJECT

The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.

NOT_FOUND

The system did not find the specified text module.

REFERENCE_CHECK

The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.

NO_REFERENCE

In the text header, the fields TDREFOBJ, TDREFID, and TDREFNAME do not contain a reference text. One or more of these fields are empty.