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: 

How to Create rangle table for Set of Fixed values.

Former Member
0 Kudos

I want to create Range table for Set of values for a particular Field.

I have workarea of 1 field with constant 12 values. See below EX.

Now i wanted to know How to create Range table for the below values.

Can range table can be created in below ex in the program itself or it has to created globally.

Explain in detail with steps. where to create it.

For ex:

    IF  ( wa-field = 'VALUE1' OR wa-field = 'VALUE2' OR wa-field = 'VALUE3' OR

wa-field = 'VALUE4' OR wa-field = 'VALUE5' OR wa-field = 'VALUE6')

ELSEIF

( wa-field = 'VALUE6' OR wa-field = 'VALUE7' OR wa-field = 'VALUE8' OR  

wa-field = 'VALUE9' OR wa-field = 'VALUE10' OR wa-field = 'VALUE11')

With regards,

Kishan Raj.K

   

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

You can easily create a RANGE type internal table to use in IN range statements option. Just read the documentation on RANGE structure definition (TYPES - RANGE OF), and build your range/internal table in few lines of codes.

Regards,

Raymond

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

You can easily create a RANGE type internal table to use in IN range statements option. Just read the documentation on RANGE structure definition (TYPES - RANGE OF), and build your range/internal table in few lines of codes.

Regards,

Raymond

0 Kudos

But how to use this (TYPES - RANGE OF), in If Condition can it be used in IF.

IF so How to do it.

0 Kudos

Okay I got the Solution. Thanks for your help.

Former Member
0 Kudos

Hi Kishan,

If u want to use the same range values in another program means then go for global declaration.

Or else declare them inside the program temporarily.

Thanks.

Pavan.

Former Member
0 Kudos

Hi Kishan,

You can find how to create range table in below link

http://help.sap.com/saphelp_470/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htm

Regards,

Vineesh