Module Pool - Using Selection Screen
For select options, create sub-screen area in
your screen layout where you want to create the select options. In the top
include of your module pool program declare a selection screen as a sub-screen
e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
Select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
In the PBO and PAI of the main screen where the select options needs to be created do a
call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING.
This call subscreen statement is necessary for transport of values between screen and program.
All validations of the selection screen fields e.g. the s_matnr field
created above should be done in selection screen events like AT
SELECTION-SCREEN etc. and not in PAI. These selection screen validations etc.
should be done in the top include only.
Comments
Post a Comment