0% found this document useful (0 votes)
30 views2 pages

Select Statement

Select-Options in ABAP is used to define input fields for users to enter a range of values or multiple single values for a table field. It allows for inclusive or exclusive ranges, multiple ranges, and single values. The statement prints the input fields on the selection screen according to the keywords used like NO INTERVALS or NO EXTENSION.

Uploaded by

avneet singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

Select Statement

Select-Options in ABAP is used to define input fields for users to enter a range of values or multiple single values for a table field. It allows for inclusive or exclusive ranges, multiple ranges, and single values. The statement prints the input fields on the selection screen according to the keywords used like NO INTERVALS or NO EXTENSION.

Uploaded by

avneet singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

https://www.sapnuts.com/courses/core-abap/selection-screen/select-options-abap.

html

Select-Options is statement which is used to define two input fields so that users can
enter a range of values, Select-Options have below additional features.

 Accepts multiple single values.


 Accepts multiple ranges (ex: 001-020, 025-30).
 Accepts exclusion of values (ex: Exclude 0004, 007 etc).
 Accepts exclusion of ranges.

Syntax 1 : SELECT-OPTIONS <SO_NAME> FOR <TABLE-FIELD>. "THIS PRINTS TWO


INPUT FIELDS (RANGE) WITH EXTENSION TO ENTER MULTIPLE RANGES
Syntax 2 : SELECT-OPTIONS <SO_NAME> FOR <TABLE-FIELD> NO INTERVALS.
"THIS PRINTS ONE INPUT FIELD WITH EXTENSION
Syntax 3 : SELECT-OPTIONS <SO_NAME> FOR <TABLE-FIELD> NO-EXTENSION. " THIS
PRINTS TWO INPUT FIELDS WITH OUT ANY EXTENSION (CAN NOT ENTER MULTIPLE
RANGES)
Syntax 4 : SELECT-OPTIONS <SO_NAME> FOR <TABLE-FIELD> NO INTERVALS NO-
EXTENSION .THIS PRINTS ONE INPUT FIELD WITH OUT INTERVALS AND EXTENSIONS
Select-Options functionality in SAP ABAP

When ever we declare Select-Options, an internal table will be created with the
following fields.

1. SIGN: This field contains I or E, where I stands for an inclusive (Include that
value) and E stands for exclusive (Exclude that values), default value is I.
2. OPTIONS: This field can accept values BT (Between), NB (Not Between), EQ
(Equal), NE(Not equal), GT(Greater than), LT(Less than) .
3. LOW: This field stores a low value of entering the range.
4. HIGH: This field stores a high value of entering the range.

Select-Options design

TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR . "PRINT SELECT-OPTIONS ON SCREEN
The above statement prints a select-options with intervals and extension .

TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR NO INTERVALS. "PRINT SELECT-OPTIONS
ON SCREEN
The above statement prints a select-options with no intervals.
TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR NO-EXTENSIONS . "PRINT SELECT-
OPTIONS ON SCREEN
The above statement prints a select-options with out extension.

TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR NO-EXTENSION NO INTERVALS. "PRINT
SELECT-OPTIONS ON SCREEN
The above statement prints a select-options with out intervals and with out extensions.

You might also like