SAP / SAP Beginner (0 to 2 yrs) Interview questions
What is the SELECT-OPTIONS statement used for?
SELECT-OPTIONS declares a range-style selection field on a report's selection screen, letting
the user specify not just a single value but a set of ranges and exclusions (like "between 100 and 200" or
"not equal to 5") — SAP automatically generates the range-entry popup UI for it.
SELECT-OPTIONS: s_kunnr FOR kna1-kunnr. START-OF-SELECTION. SELECT * FROM kna1 INTO TABLE @DATA(lt_customers) WHERE kunnr IN @s_kunnr.
Behind the scenes, SELECT-OPTIONS generates an internal table structure with columns for
SIGN (include/exclude), OPTION (the comparison operator like EQ,
BT for "between"), LOW, and HIGH — and the IN
operator in a WHERE clause is specifically designed to filter against this range structure
directly.
More Related questions...