Set Default Single Values List for SAP Selection Screen Parameter
In this ABAP tutorial, SAP Selection Screen developers will learn how to set default single values list for a selection screen parameter.
This guide includes a simple SAP Selection Screen which can be used for a filter screen to set criterias for an ABAP report parameters.
The sample ABAP codes includes SELECTION-SCREEN code block where nearly all parameters have default values identified with DEFAULT in Select-Options codes.
Only select option so_vmsta which is used to filter among material sales status using mvke-vmsta has not have a single default value.
Assume that as a requirement ABAP developer wants to set a list of sales status values {E,G,GI,I,L,LA,LD,LE} to set as default values list for the target select option in the SAP selection screen.
This document shows how to set a list of values as default values in a SAP Selection Screen for a Select-Option.
Here is the SAP Selection-Screen ABAP code.
ABAP developers will realize how Default keyword is used to set default value for single values.
How can ABAP code developers set a values list as Default for a Select Option ?
In order to manage this task, right after the end of Selection Screen codes,
after END-OF-SELECTION statement line,
add INITIALIZATION statement which has following ABAP codes.
ABAP developers can see that the above sample code sets the Select Option sign as 'I' and option as 'EQ' means equal. The select option low value stores one item from default values list. When the property settings is completed append it to Select Option table.
When you repeat the same setting for each item in the Default Single Values list, our goal is reached.
You can see the default values for Selection Screen select option parameters in the following screenshot from an ABAP report.
It is possible to display the preselected values for a select option by pressing the arrow on the right side of the parameter.
You see, the default value list is formed of a long list of single values valid for the Selection Screen select option so_vmsta.
Here is a closer look at the single value list as default criteria for select option so_vmsta.
Add the ABAP codes that will execute after Selection Screen is displayed, right after START-OF-SELECTION.
Now it is possible to run the ABAP report with the desired default values assigned to Select Options in the SAP Selection Screen.