01-07-2009 9:33 AM
Hi all,
i would like to initialize a parameter of my SELECT-OPTIONS.
My code :
SELECT-OPTIONS: s_date FOR sy-datum,
ptype FOR l_bkpf-blart,
pexo FOR l_bkpf-gjahr.
INITIALIZATION.
pexo-sign = 'I'.
pexo-option = 'EQ'.
pexo-high = sy-datum(4).
pexo-low = sy-datum(4) - 1.
APPEND pexo.
START-OF-SELECTION.
...
Well, my problem is that in my START-OF-SELECTION the pexo variable have not the values of INITIALIZATION, the system write in option 'BT'. Any ideas ?
Thanks
01-07-2009 9:42 AM
HI,
when you passing the low value and High value you need to use the BT option not the EQ. as system considers the value need to check between low and high.
SELECT-OPTIONS: s_date FOR sy-datum,
ptype FOR l_bkpf-blart,
pexo FOR l_bkpf-gjahr.
INITIALIZATION.
pexo-sign = 'I'.
pexo-option = 'BT'.
pexo-high = sy-datum(4).
pexo-low = sy-datum(4) - 1.
APPEND pexo.
START-OF-SELECTION.
01-07-2009 9:43 AM
Hi,
try below:
INITIALIZATION.
pexo-sign = 'I'.
pexo-option = 'EQ'.
pexo-high = sy-datum(4).
pexo-low = sy-datum(4) - 1.
Modify pexo.
Hope it solves your problem.
Thanks!!
01-07-2009 9:46 AM
Hi,
Try the below code.
SELECT-OPTIONS: s_date FOR sy-datum,
ptype FOR l_bkpf-blart,
pexo FOR l_bkpf-gjahr.
INITIALIZATION.
pexo-sign = 'I'.
pexo-option = 'BT'.
pexo-high = sy-datum(4).
pexo-low = sy-datum(4) - 1.
APPEND pexo.
START-OF-SELECTION.
01-07-2009 9:48 AM
Hi,
Here in you program you have given both the low and high i.e you are initialising a range..So , the option BT will be used..the option EQ is used only when you are giving single value.....
Regards
Vasavi Kotha
01-07-2009 9:50 AM
In the INITIALIZATION.below you are providing both low and high values so it has to option BT .System doing is write .change ur INITIALIZATION event.
INITIALIZATION.
pexo-sign = 'I'.
pexo-option = 'EQ'.
pexo-high = sy-datum(4).
pexo-low = sy-datum(4) - 1.
APPEND pexo.
01-07-2009 9:53 AM
Hi ,
You had assigned the values in initialization , tht is correct ,
as this selection option will act like an internal table and it has structure like
SIGN , OPTION , LOW ,HIGH .
it will store all the values provided by you.
so after the code you mentioned , if in START-OF-SELECTION.
if you write a statement like
write pexo. " Output is IBT20082009 .
take the values separetely like
write: pexo-low , pexo-high. " output is 2008 2009 .
Regards,
Aby
01-07-2009 9:59 AM
hi,
SELECT-OPTIONS: s_date FOR sy-datum,
ptype FOR l_bkpf-blart,
pexo FOR l_bkpf-gjahr.
INITIALIZATION.
pexo-sign = 'I'.
pexo-option = 'BT'.
pexo-high = sy-datum(4).
pexo-low = sy-datum(4) - 1.
APPEND pexo.
START-OF-SELECTION.
thanks
06-04-2009 12:56 PM