cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in Select Option fetch

Former Member
0 Kudos

Hello Every1,

I have a select option field for which the input values can be given as in the below example.

Ex. If the input value is given as 10* as the low value and 100* as the high value, i need to fetch records in this range.Which means it should not only include all values starting with 10 and 100 but also the values between 10 and 100. Please let me know how this can be achieved.

Best Regards,

Siva.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry the example can be taken as may be 1* as the low value and 2* as the high value. for this i need to get all the values starting with 1 and 2 and also the values between 1 and 2.

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

This is really straight forward from programming point of view - there is nothing special to be done (check with SE16!).

But maybe you struggle with leading zeros. I tested with MARA, here I had to fill 000000000010001* - 000000000010003* to get a result. Reason: there is a conversion exit ALPHA. This adds leading zeros, as long as the input contains only numbers: * is not a number. But our material numbers are stored with leading zeros in database, because they contain only numbers - so here leading zeros have to be added manual.

Regards,

Christian

Answers (1)

Answers (1)

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Siva!

The expression 10* is matching a lot of different values:

101, 100009, 104232...

But all values, which match the expression 100* are a sub-range of the expression 10*!

Your selection might look like this:

100* - 103*

But that's all included in the standard functionality when you define a selection variable via 'select-options'. This is also the way of SE16 transaction.

Regards,

Christian