Start of Content Area

READ_FORM_LINES   Locate the document in its SAP Library structure

Use this function module to transfer the lines of a form element into an internal table.

If you specify no form name, the system transfers the text lines of the currently open form. If you specify a form, the system uses the text lines of the active version of the form from the database.

 

Function call:

 

CALL FUNCTION 'READ_FORM_LINES'

EXPORTING FORM = SPACE

LANGUAGE = SPACE

WINDOW = 'MAIN'

ELEMENT = SPACE

TABLES LINES = ?...

EXCEPTIONS ELEMENT =

FORM =

UNOPENED =

 

Export parameters:

FORM

Specify the name of the form whose element list you want to create. If you leave the field blank, the system uses the currently active form.

Default value: SPACE

LANGUAGE

Specify the desired form language.

Default value: SPACE

WINDOW

Enter the name of the window in which to find the form element. If you leave the field blank, the system searches for the form element in the main window.

Default value: 'MAIN'

ELEMENT

Enter the name of the form element whose text lines you want to read. If you leave the field blank, the system searches for the 'nameless' element.

Default value: SPACE

 

Table parameters:

LINES

The table receives the lines of the specified element.

Structure: TLINE

 

Exceptions:

ELEMENT

The parameter ELEMENT contains the name of a form element which the system could not find.

Possible reasons:

  • The element does not exist. An element refers to a window, and the specified window does not contain the element. If no window is specified, the system searches for the element in the main window.
  • The specified element is not defined in the form.
  • The form version that contains the text element in the specified form window is not active.

FORM

The parameter FORM contains the name of a form which could not be found.

Possible reasons:

  • The form does not exist.
  • There is no active version of this form.

SAPscript first searches for the form in the current client and in the specified language. If the form does not exist there, it tries the original language of the form. If the form is still not found, it searches in client 0, first in the specified language, than in the original form language.

UNOPENED

The current form function could not be executed, since the form output was no yet initialized using OPEN_FORM.