SAP SELECTION-SCREEN LAYOUT ABAP Statements



Get Example source ABAP code based on a different SAP table
  



SELECTION-SCREEN, screen_elements
Short Reference

ABAP_SYNTAX_FORMS

Blank Lines
1 SELECTION-SCREEN SKIP $[n$] $[ldb_additions$].

Horizontal Lines
2 SELECTION-SCREEN ULINE $[$[/$]$[pos$](len)$] $[MODIF ID modid$]
$[ldb_additions$].

Output Fields
3 SELECTION-SCREEN COMMENT $[/$]$[pos$](len)
${text$|${$[text$] FOR FIELD sel$}$}
$[VISIBLE LENGTH vlen$]
$[MODIF ID modid$]
$[ldb_additions$].

Pushbuttons
4 SELECTION-SCREEN PUSHBUTTON $[/$]$[pos$](len) button_text
USER-COMMAND ucom
$[VISIBLE LENGTH vlen$]
$[MODIF ID modid$]
$[ldb_additions$].

Lines with Multiple Elements
5 SELECTION-SCREEN BEGIN OF LINE.
...
$[SELECTION-SCREEN POSITION pos $[ldb_additions$]$].
...
SELECTION-SCREEN END OF LINE.

Blocks
6 SELECTION-SCREEN BEGIN OF BLOCK block
$[WITH FRAME $[TITLE title$]$]
$[NO INTERVALS$].
...
SELECTION-SCREEN END OF BLOCK block.

Tabstrips
7 SELECTION-SCREEN BEGIN OF TABBED BLOCK tblock FOR n LINES.
...
SELECTION-SCREEN TAB (len) tab USER-COMMAND ucom
$[DEFAULT $[PROGRAM prog$] SCREEN dynnr$].
...
SELECTION-SCREEN END OF BLOCK tblock.

Pushbuttons in the ApplicationToolbar
8 SELECTION-SCREEN FUNCTION KEY n $[ldb_additions$].

What does it do?
The selection screen input fields are created using the statements PARAMETERS and SELECT-OPTIONS . By default, each of these statements creates its own line on the selection screen. The variants of the statement SELECTION-SCREEN shown above allow selection screens to be created differently. Other screen elements can be defined and the order of elements on the screen modified.
The above statements can be executed within the definition of a selection screen in the global declaration part of executable programs, function pools and module pools .



Latest notes:

The maximum width of a selection screen is 83. If this width is exceeded, the selection screen is truncated or not generated. In the case of blocks with a frame, the maximum width is reduced by the width of the frame.
All selection screen elements that can be created using the statement SELECTION-SCREEN are located in one namespace. This is the case even if the elements were created in different selection screens. In the case of selection screen elements for which a global data object is generated when the objects are created, the namespace of the program data object must also be respected. If an element or a data object is to be used in multiple selection screens, the addition