‎2006 Feb 06 4:46 PM
Hi!,
Is the first time that I work with ranges, some body can explain me this code? I dont know if the append in this code is correct or I need to put it below of it r_bstat-low and I dont know how can I use the LOW or High part in this code.
Thanks!!
ranges: r_bstat for bkpf-bstat occurs 0.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'.
r_bstat-LOW = 'S'.
r_bstat-LOW = 'V'.
r_bstat-LOW = 'W'.
r_bstat-LOW = 'Z'.
r_bstat-LOW = 'D'.
APPEND R_BSTAT.
‎2006 Feb 06 4:50 PM
Hi Carlos,
Change your code as mentioned below:
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'.
r_bstat-LOW = 'S'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'V'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'W'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'Z'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'D'.
APPEND R_BSTAT.
Hope this may help you.
Lanka
‎2006 Feb 06 4:50 PM
Hi Carlos,
Change your code as mentioned below:
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'.
r_bstat-LOW = 'S'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'V'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'W'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'Z'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'
r_bstat-LOW = 'D'.
APPEND R_BSTAT.
Hope this may help you.
Lanka
‎2006 Feb 06 4:50 PM
If you wish to exclude all of those values, you need to append to the table for each.
ranges: r_bstat for bkpf-bstat.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'.
r_bstat-LOW = 'S'. APPEND R_BSTAT.
r_bstat-LOW = 'V'. APPEND R_BSTAT.
r_bstat-LOW = 'W'. APPEND R_BSTAT.
r_bstat-LOW = 'Z'. APPEND R_BSTAT.
r_bstat-LOW = 'D'. APPEND R_BSTAT.
Regards,
Rich Heilman
‎2006 Feb 06 4:50 PM
HI Carlos,
You have to append each time for LOW to the field.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'.
r_bstat-LOW = 'S'.
APPEND R_BSTAT.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'.
r_bstat-LOW = 'V'.
APPEND R_BSTAT.
etc etc....
‎2006 Feb 06 4:50 PM
Try:
ranges: r_bstat for bkpf-bstat occurs 0.
r_bstat-sign = 'E'.
r_bstat-option = 'EQ'.
r_bstat-LOW = 'S'.
APPEND R_BSTAT.
r_bstat-LOW = 'V'.
APPEND R_BSTAT.
r_bstat-LOW = 'W'.
APPEND R_BSTAT.
r_bstat-LOW = 'Z'.
APPEND R_BSTAT.
r_bstat-LOW = 'D'.
APPEND R_BSTAT.
Rob
‎2006 Feb 06 4:55 PM
hi Carlos,
You can use the RANGES statement to create internal tables of the same type as selection
tables...
i.e..
This statement is simply a shortened form of the following statements:
DATA: BEGIN OF <rangetab> OCCURS 0,
SIGN(1),
OPTION(2)
LOW LIKE <f>,
HIGH LIKE <f>,
END OF <rangetab>.
hope you got the idea behind ranges..
Internal tables created with RANGES have the same structure as selection tables, but they do
not have the same functionality.
RANGES R_CARRID FOR SPFLI-CARRID.
R_CARRID-SIGN = 'I'.
R_CARRID-OPTION = 'EQ'.
R_CARRID-LOW = 'LH'.
APPEND S_CARRID.
IF CARRID IN R_CARRID.
Does this answer your question...
‎2006 Feb 06 6:07 PM
Thanks for the help people, now I understand better the ranges.