CALL SUBSCREEN
Basic form
CALL SUBSCREEN b INCLUDING prog dynnr .
Variants:
1.CALL CUSTOMER-SUBSCREEN b INCLUDING SAPLX... dynp .
Effect
Displays and processes the subscreen screen 'dynnr' from program 'prog' in the defined area 'b' of the main screen.
On the screen, you can define areas into which you place dynamic subscreens at runtime. Each area in the screen must have a unique name, which may be up to 10 characters long. In the flow logic, you address an area in the PBO ( PROCESS BEFORE OUTPUT ) event using the following statement:
CALL SUBSCREEN b INCLUDING prog dynnr.
Specify the name of the area without inverted commas. You can specify the program name and screen number either as a literal or a variable.
When you call the subscreen in the PBO, only its PBO modules are processed.
You process the PAI modules of the subscreen in the PAI (PROCESS AFTER INPUT ) event of the main screen using the statement
CALL SUBSCREEN b.
You define the subscreen area on the main screen in the fullscreen editor.
You maintain the subscreen screen itself like a normal screen in the Screen Painter. In the screen attributes, you must mark it as a subscreen .
Nested subscreens are possible, that is, a subscreen screen can itself call another subscreen.
A normal screen can contain multiple areas for multiple subscreens.
Notes
CALL SUBSCREEN ... is not allowed between LOOP and ENDLOOP or between CHAIN and ENDCHAIN . This means that you cannot repeat subscreens in the same way you can repeat fields in a loop.
Field names must be unique across all subscreens that are called either statically or dynamically from the same main screen. .
A subscreen screen may not have a named OK code field. Function codes can only be passed to the OK code field of the main screen.
Subscreen screens may not contain an ... AT EXIT-COMMAND module. Exit handling is only possible from the main screen.
F1 help and F4 input help is supported on subscreens.
You can only set the GUI status from modules of the main screen. If you use the SET TITLEBAR , SET PF-STATUS , SET SCREEN , or LEAVE SCREEN statements in the modules of a subscreen, a runtime error occurs.
The following system fields contain data about the current screen or subscreen:
- SY-DYNNR Screen number
- SY-DYNGR Screen group
- SY-CUROW Cursor line
- SY-CUCOL Cursor column
- SY-STEPL Loop pass
- SY-LOOPC Loop number
On a subscreen, you can use SET CURSOR to position the cursor on a particular field. However, a SET CURSOR statement can only refer to fields on the current screen or subscreen. You can find out the current cursor position using GET CURSOR . If the cursor is positioned on a field that is not on the current screen or subscreen, the FIELD , LINE , and OFFSET parameters do not return any values. Instead, the AREA parameter indicates the screen in which the cursor is located.