SAP SELECTION-SCREEN NORMAL ABAP Statements

Get Example source ABAP code based on a different SAP table
  



SELECTION-SCREEN - SCREEN

Short Reference


ABAP Syntax SELECTION-SCREEN BEGIN OF SCREEN dynnr [TITLE
title]
[AS WINDOW].
...
SELECTION-SCREEN END OF SCREEN dynnr.

ABAP Addition
1 ... TITLE title
2 ... AS WINDOW

What does it do? These statements can be executed in the global declaration section of executable programs, function groups, and module pools. You create a stand-alone selection screen with the screen number dynnr. You must specify the screen number directly and it must comprise a maximum of four digits.

All the PARAMETERS, SELECT-OPTIONS, and SELECTION-SCREEN statements that are executed within these statements define the screen elements for the stand-alone selection screen. You cannot define a further selection screen within the definition of a selection screen.
• TITLE SELECTION-SCREEN BEGIN OF

ABAP Addition

What does it do? You can use the TITLE addition to define a title for the title bar of your stand-alone selection screen. For the title, you can either specify a name of your choice with a maximum of 8 characters or the name of a text symbol from the program in the form text-idf, where idf is the three-character ID of the text symbol. If you specify a name of your choice, the runtime environment generates a type c global variant of the same name and 70 characters in length. When the selection screen is displayed, the first 70 characters of the text symbol or global variants are displayed in the title bar. If the specified text symbol is not found, the name of the text symbol is displayed as the title in the form 'TEXT-idf'. If the TITLE addition is not specified, the system uses the title of the program defined in the program attributes.
• AS WINDOW SELECTION-SCREEN BEGIN OF

ABAP Addition

What does it do? You can use the AS WINDOW addition to define a stand-alone selection screen for display in a modal dialog box. The actual shape of the window is not defined until it is accessed by CALL SELECTION-SCREEN. The AS WINDOW addition also displays warnings and error messages that occur during processing of a selection screen event as a modal dialog box.



Latest notes:The specified screen number dynnr must not already
be assigned to existing screens or selection screens. You should also note that the number 1000 for the standard selection screen cannot be used for a stand-alone selection screen in an executable program.



Example ABAP Coding
Definition and access of a selection screen as a modal
dialog box. SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title
AS WINDOW.
PARAMETERS name TYPE sy-uname.
SELECTION-SCREEN END OF SCREEN 500.

title = 'Input name'.

CALL SELECTION-SCREEN '0500' STARTING AT 10 10.

Return to menu