Ansicht
Dokumentation

ABAPSELECTION-SCREEN_FMT - SELECTION-SCREEN FMT

ABAPSELECTION-SCREEN_FMT - SELECTION-SCREEN FMT

BAL_S_LOG - Application Log: Log header data   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

SELECTION-SCREEN - Specifying Formats on a Selection Screen

Specifying format fmt in a SELECTION-SCREEN statement.
fmt has the form /pos(len), pos(len) or (len). The forward slash (/) is the sign for a line feed, and is therefore not allowed between BEGIN OF LINE and END OF LINE. The SELECTION-SCREEN object (comment, pushbutton or underline) is generated on the selection screen at position pos with length len. The (len) (no position specified) is only allowed between BEGIN OF LINE and END OF LINE. When you use it, the object is placed at the current position in the line. (Compare WRITE.)
You can specify the position pos as a number (in this case, it is relative to the frame if the statement comes between the BEGIN OF BLOCK ... WITH FRAME and END OF BLOCK statements). You can also specify the symbolic positions POS_LOW and POS_HIGH. These are the positions at which the output fields of a SELECT-OPTIONS appear. (POS_LOW is also the output position for PARAMETERS).

Note

If you specify a format without a line feed, you might create overlapping objects on the selection screen. For this reason, you should be particularly careful when specifying positions and lengths.

Example

SELECTION-SCREEN BEGIN OF LINE.
  SELECTION-SCREEN COMMENT 10(15) TEXT-001
                   FOR FIELD PARM.
  SELECTION-SCREEN POSITION POS_LOW.
  PARAMETERS PARM LIKE SAPLANE-PLANETYPE.
  SELECTION-SCREEN PUSHBUTTON POS_HIGH(8) PUSHY
                   USER-COMMAND ABCD.
  SELECTION-SCREEN ULINE (5).
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN ULINE /12(10).

This example generates the following objects in a single line:

  • A comment at position 10 with length 15, contents from TEXT-001.
  • A parameter PARM in its usual position (POS_LOW)
  • A pushbutton at the position of the "to" field of a SELECT-OPTIONS with length 8. Contents: The contents of the field PUSHY, set at runtime.
  • An underline with length 5, immediately next to the pushbutton (since the format specification "(5)" does not contain a position).

The next line contains an underline with length 10, starting at position 12.

Additional help

Edit Selection Screens






BAL_S_LOG - Application Log: Log header data   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 4146 Date: 20240329 Time: 005329     sap01-206 ( 83 ms )