Call selection screen

CALL - Call a selection screen

Addition:

... STARTING AT x1 y1 ... ENDING AT x2 y2

Effect

Similar to

CALL SCREEN , except the screen you are calling must be a Selection screen defined using SELECTION-SCREEN BEGIN/END OF SCREEN or the standard selection screen of a report.


Control is returned automatically by the system from the screen to the program, and not, as in CALL SCREEN , using separate statements.

Effect

The same as

CALL SCREEN , although the "ENDING AT" specification is optional.

SY-SUBRC = 4:

The user has chosen 'Cancel'.
In this case, all Select-Options and parameters have the same values after the CALL SELECTION-SCREEN as before.

Note

If you call a selection screen using CALL SCREEN instead of CALL SELECTION-SCREEN, the initialization necessary for selection screens is not carried out, and the screen will not run properly when displayed.

Example

TABLES SPFLI. 
 
SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456. 
  SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1 
									NO INTERVALS. 
	SELECT-OPTIONS SEL1 FOR SY-SUBRC. 
	PARAMETERS	 PAR1 LIKE SPFLI-CARRID. 
	SELECTION-SCREEN COMMENT /10(20) TEXT-COM. 
  SELECTION-SCREEN END OF BLOCK BL1. 
SELECTION-SCREEN END OF SCREEN 123. 
 
... 
 
CALL SELECTION-SCREEN 123 STARTING AT 20 5. 
IF SY-SUBRC = 0. 
  ... 
ELSE. 
  ... 
ENDIF. 

Screen 123 is displayed as a modal dialog box. When control returns to the program, SY-SUBRC tells you whether the user chose 'Continue' to use the values entered on the screen, or 'Cancel'.

DYNP_TOO_MANY_CALL_SCREENS: You cannot use Call Screen. The maximum number of screens which can be nested is currently 50.