Start of Content Area

EDIT_TEXT_INLINE   Locate the document in its SAP Library structure

In an application it may be necessary to display or edit the first few lines of a text in any screen. To do this, use the function module EDIT_TEXT_INLINE.

The system then merges the lines of table INLINES with those of table LINES. The parameter INLINE_COUNT determines the number of lines in table INLINES. If necessary, the user can branch to the fullscreen editor. In this case, the function module behaves like EDIT_TEXT.

After executing the function, the system fills table INLINES with the specified number of lines from LINES. You can use the parameter SAVE to specify whether to call the function module SAVE_TEXT automatically if any lines are changed.

The application program is responsible for outputting the text lines from table INLINES to the screen and for returning the changed lines after the user pressed ENTER . On the application screen, the user can use only the general editing functions provided for all screen fields.

The function module is called at the PBO event.

 

Function call:

 

CALL FUNCTION 'EDIT_TEXT_INLINE'

EXPORTING

DISPLAY = SPACE

EDITOR_TITLE= SPACE

HEADER =

INLINE_COUNT=

SAVE = 'X'

TEXTSCREEN = SPACE

CONTROL = SPACE

PROGRAM = SPACE

IMPORTING

FUNCTION =

NEWHEADER =

RESULT =

TABLES

INLINES =

LINES =

EXCEPTIONS

ID =

LANGUAGE =

LINESIZE =

NAME =

OBJECT =

 

Export parameters:

DISPLAY

The parameter indicates whether the text editor is called in display or in change mode. In display mode, the user cannot edit the text.

Possible values:

'X' display mode

' ' change mode

Default value: SPACE

EDITOR_TITLE

Enter a title that you want the system to display in the title bar of the text editor window in addition to the headings generated by SAPscript.

Reference field: TTXIT-TDTEXT

Default value: SPACE

HEADER

Enter the structure that contains the text header of the text to be edited.

Structure: THEAD

INLINE_COUNT

Enter the number of text lines you want the system to pass from table LINES to table INLINES. The system always starts at the beginning of table LINES. This value corresponds to the number of text lines displayed on a screen.

SAVE

Use this parameter to determine whether the system calls SAVE_TEXT after saving the text in the editor. If you want to suppress this call, the application program must lateron call the function module SAVE_TEXT itself. In both cases, the system returns the changed text lines to the application program.

Possible values:

'X' call SAVE_TEXT

' ' suppress SAVE_TEXT

Default value: 'X'

TEXTSCREEN

The parameter determines whether, after comparing the INLINES lines, to call the text editor.

Possible values:

' ' do not call text editor

'X' call text editor

Default value: SPACE

CONTROL

Use the parameter CONTROL to set certain attributes of the SAPscript Editor. These attributes are described in the fields of structure ITCED.

Structure: ITCED

Default value: SPACE

PROGRAM

Use this parameter to determine the program whose work areas the system uses to replace the values of the program symbols. If you omit this parameter, the system uses the first program called to search for the field values (SY-CPROG).

The form processor replaces program symbols in the print view only, but not in the editor itself.

Reference field: SY-REPID

Default value: SPACE

 

Import parameters:

FUNCTION

Return parameter for the processing status of the text module for the current editor call.

Possible values:

' ' no action

'I' text module created

'U' text module changed

'D' text module deleted

NEWHEADER

Return parameter for the text header. Due to certain operations in the editor, also fields in the text header are changed.

Structure: THEAD

RESULT

The SAPscript Editor uses this parameter to return status information to the calling program. The information is described by the fields of structure ITCER.

Structure: ITCER

 

Table parameters:

INLINES

Contains the first INLINE_COUNT lines of table LINES. The application program must transfer these lines at the PAI event to the corresponding fields of the appropriate application screen. And, at the PBO event, it must return the lines from the screen fields to the table before calling the function module.

Structure: TLINE

LINES

Contains the table with the lines of the text module.

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 language key specified in the parameter LANGUAGE of the text header is not defined in table T002.

LINESIZE

The field TDLINESIZE of the text header contains a line width less than 0 or greater than 132.

NAME

The parameter NAME or the field TDNAME of the text header contains the name of a text module, which 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 in the text header contains the name of a text object, which is not defined in table TTXOB.