Application Development 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: 

Extract individual values from a Select-Option or Range table

Former Member
0 Kudos

Hi all,

The other day I was developing a report and I was needing the individual values from a Range table. The range table was as follows:

Position 1: Values from A - B

Position 2: Single value C

Position 3: Values from D - E

..

..

Etc.

What I was needing was ALL the individual values from A to B and also the individual values from D to E.

If the range table contains, let's say, customer numbers (KUNNR) you can get the individual values by getting all the values from table KNA1 which are included in the Select-Option (or RANGE). This is just an example.

I made it that way but I believe that there is a function module that might do the same if we don't have a table like KNA1 which has all the possible values.

Is this right? Does anybody know a way to get all those individual values?

Many thanks in advance.

3 REPLIES 3

JozsefSzikszai
Active Contributor
0 Kudos

I don't know if such FM exists (I assume it does not, but I was already wrong several times on such assumptions

But the main questions are: if there is no table for selection, how could we know for sure if a specific value exists or not? Your example:

Position 1: Values from A - B

Position 2: Single value C

Position 3: Values from D - E

Easily, the single values would be: A, B, C, D, E. But how could we decide if 'B' really exists or not? Or is it not important?

On the other hand these ranges are used for WHERE conditions when selecting data from tables, so I think there really has to be a check table somewhere

0 Kudos

Yes, I supose that the function module I say would be difficult to implement because we can not be sure what values will exist between A and B.

But SAP has surprised me many times so, who knows?

Former Member
0 Kudos

Hi all,

Just closing this old question.

As Eric said there was no way to find values without a reference table.

tya