ABAP Core Part 5: Selection Screens — PARAMETERS, SELECT-OPTIONS and Validation
Preview · a free account unlocks the full lesson
Build selection screens users understand: PARAMETERS, SELECT-OPTIONS and ranges, checkboxes and radio buttons, defaults, value helps and input validation in AT SELECTION-SCREEN.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Parts 1 through 4 used a single input parameter. Real reports need more flexible input than that, and this part covers the classic selection screen used by executable programs.
PARAMETERS defines a single input value: PARAMETERS p_carr TYPE s_carr_id OBLIGATORY. PARAMETERS = one value; SELECT-OPTIONS = a range table (single values, intervals, exclusions). Giving it a TYPE from the dictionary brings along a field label — which can be overridden through Goto → Text elements → Selection texts — plus automatic F4 help and type checks.
Other useful additions include DEFAULT, OBLIGATORY, LOWER CASE and MEMORY ID. A checkbox is just PARAMETERS p_test AS CHECKBOX DEFAULT 'X'., and radio buttons work as a group: PARAMETERS: p_list RADIOBUTTON GROUP out DEFAULT 'X', p_alv RADIOBUTTON GROUP out.
SELECT-OPTIONS, by contrast, builds a full range table: SELECT-OPTIONS s_fldate FOR ls_sflight-fldate. creates a range table carrying SIGN (I for include, E for exclude), OPTION (EQ, BT, CP, and so on), LOW and HIGH. Use SELECT-OPTIONS directly in WHERE … IN s_… — empty means "all".
It plugs directly into a WHERE clause as WHERE fldate IN @s_fldate, where an empty range means no restriction at all. NO-EXTENSION and NO INTERVALS can restrict what kind of input the user is allowed to enter, and ranges can also be built entirely in code with something like DATA lt_range TYPE RANGE OF s_carr_id.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.