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

ranges date type... how it works

Former Member
0 Likes
1,375

Hi,

Here is my question:

How does ranges types work.

I came across this code:

ranges: hrs for t512t-lgart

ls_range LIKE t512t-lgart,

*Fill constant values in range

ls_range-sign = 'I'.

ls_range-option = 'EQ'.

*Load range tables with preliminary values

move-corresponding ls_range to hrs.

I dont got this..Can you explain how sign and option works..what is the purpose behind it

Hi,

Here is my question:

How does ranges types work.

I came across this code:

ranges: hrs for t512t-lgart

ls_range LIKE t512t-lgart,

*Fill constant values in range

ls_range-sign = 'I'.

ls_range-option = 'EQ'.

*Load range tables with preliminary values

move-corresponding ls_range to hrs.

I dont got this..Can you explain how sign and option works..what is the purpose behind it

4 REPLIES 4
Read only

Sm1tje
Active Contributor
0 Likes
1,156

Sign means Include and Exclude

Option for example can be all operators like GE (>=), LE (<=), BT (between), EQ (=) etc.

Read only

Former Member
0 Likes
1,156

HI,

In Ranges you hane High and Low values.

Sign = I Or E

'I' Means the the Data be fetched is will include the High and Low value

E Exlude the Values.

Option Can be EQ , GE , GT LT Etc.

Regards

Sumit Agarwal

Read only

Former Member
0 Likes
1,156

Hi Deepan,

Just go through the following link:

Hope this will help.

Regards,

Nitin.

Read only

Former Member
0 Likes
1,156

Hello Deepan,

Ranges have same structure as 'Select Options'. The difference is that Select options are used in Selection Screen and 'Ranges' are used internally for coding purpose in a program.

The structure of Ranges is

RANGE-SIGN = 'I' OR 'E' (Include/Exclude)

RANGE-OPTION (Possbile Values are 'EQ' ,'BT' etc )

RANGE-LOW - lower limit

RANGE-HIGH - upper limit

Example:

RANGES : R_EBELN LIKE EKPO-EBELN.

The above statement creates a internal table with the structure mentioned above.

LOW and HIGH can have values similar to EBELN

Sample Code :

R_EBELN-SIGN = 'I'.

R_EBELN-OPTION = 'BT'.

R_EBELN-LOW = '0000000100'.

R_EBELN-HIGH = '0000000200'.

APPEND R_EBELN.

The baove statemet means that range R_EBELN has got values betwen '00000000100' TO '0000000200'.

R_EBELN-SIGN = 'E'.

R_EBELN-OPTION = 'EQ'.

R_EBELN-LOW = '0000000106'.

APPEND R_EBELN.

The above statement means that R_EBELN is not equal to '0000000106'.

Hope its clear.

Thanks,

Jyothi