09-11-2008 4:14 PM
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
09-11-2008 4:17 PM
Sign means Include and Exclude
Option for example can be all operators like GE (>=), LE (<=), BT (between), EQ (=) etc.
09-11-2008 4:20 PM
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
09-11-2008 4:22 PM
09-11-2008 4:31 PM
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