Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select-options: get all selections

Former Member
0 Likes
947

Hi All,

I have a field with select-options:.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE frametxt.

SELECT-OPTIONS:

cttyp for p0016-cttyp.

SELECTION-SCREEN END OF BLOCK block1.

If a user enters more than 2 fields, how do I get all of them in my program?

Thanks,

~Mark

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
889

Hi Mark,

If you want to use select-options for some database selection in SELECT statement or in any other logical expression, you can use IN operator which takes care of almost all situations that can use select-options.

The select-options table has 4 fields in the order

SIGN - 1 char, can have values 'I' for inclusion and 'E' for exclusion.

OPTION - 2 char, can have values 'EQ' for equal, 'NE' not equal and 'BT' for between to represent ranges of field values mentioned in fields LOW and HIGH.

LOW - typed to a table field, can have field values

HIGH - typed to a table field, can have field values

If you really want to access the values in the select-options, you have to loop over it and check the SIGN and OPTION fields so that actual field values mentioned in LOW and HIGH fields can be appropriately used.

Hope this helps.

Thanks

Sanjeev

Hi All,

I have a field with select-options:.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE frametxt.

SELECT-OPTIONS:

cttyp for p0016-cttyp.

SELECTION-SCREEN END OF BLOCK block1.

If a user enters more than 2 fields, how do I get all of them in my program?

Thanks,

~Mark

5 REPLIES 5
Read only

Former Member
0 Likes
889

not sure what your asking, but the select option is an internal table that you can loop through to get all values entered. There is a low- high option & sign which will tell you everything you need to know.

Read only

0 Likes
889

I see the low and high value but not sure how to get the rest of the values?

Read only

Former Member
0 Likes
889

Select options is like an internal table.

The cctyp has all the values entered by user.

You can loop on cctyp.

Any selection options has four fields.

SIGN

OPTION

LOW

HIGH

Read only

Former Member
0 Likes
889

SELECT from p0016 using the SELECT OPTION. There may be ranges, exclusions, patterns, etc.

Rob

Read only

Former Member
0 Likes
890

Hi Mark,

If you want to use select-options for some database selection in SELECT statement or in any other logical expression, you can use IN operator which takes care of almost all situations that can use select-options.

The select-options table has 4 fields in the order

SIGN - 1 char, can have values 'I' for inclusion and 'E' for exclusion.

OPTION - 2 char, can have values 'EQ' for equal, 'NE' not equal and 'BT' for between to represent ranges of field values mentioned in fields LOW and HIGH.

LOW - typed to a table field, can have field values

HIGH - typed to a table field, can have field values

If you really want to access the values in the select-options, you have to loop over it and check the SIGN and OPTION fields so that actual field values mentioned in LOW and HIGH fields can be appropriately used.

Hope this helps.

Thanks

Sanjeev