‎2007 Feb 09 5:15 AM
hi,
may i know how to assign the select-options data to itab if user enter the range as well as single val or also with exclude single val or exclude ranges.
if i use like this it will also get the low and high in the selection screen.
this is using ranges. but i need to store werks only in normal itab.
v_werks-sign = 'I'.
v_werks-option = 'EQ'.
v_werks-low = sdwerk-low.
v_werks-high = sdwerk-high.
append v_werks.
v_werks-sign = 'I'.
v_werks-option = 'BT'.
v_werks-low = sdwerk-low.
v_werks-high = sdwerk-high.
append v_werks.
‎2007 Feb 09 5:18 AM
Hi,
The select-options itself is an internal table format, if u see in debugging mode u can understand.
v_werks[] = s_werks[].All the values will get moved into the itab u want.
‎2007 Feb 09 5:18 AM
Hi,
The select-options itself is an internal table format, if u see in debugging mode u can understand.
v_werks[] = s_werks[].All the values will get moved into the itab u want.
‎2007 Feb 09 5:18 AM
tables: t001w.
select-options: s_werks for t001w-werks.
types: begin of ty_werks,
werks type t001w-werks,
end of ty_werks.
data: wa_werks type ty_werks.
data: lt_werks type ty_werks.
loop at s_werks where option = 'EQ' and sign ='I'.
wa_werks-werks = s_werks-low.
append wa_werks to lt_werks
endloop.
‎2007 Feb 09 5:18 AM
Hi,
Sorry i am not clear with what is your exact requirement.
Please clarify a bit more.
Regards
Arun
‎2007 Feb 09 5:21 AM
Say you have defined Select-option as 'sdwerk' for plant.
To include all the Plants in the entered selection into one internal table use below code:
DATA: begin of i_werks occurs 0,
werks like t001w-werks,
end of i_werks.
SELECT werks INTO table i_werks FROM T001W WHERE werks IN sdwerk.
Internal table sdwerk will have all the entered plants now.
Thanks
‎2007 Feb 09 5:22 AM
loop at sdwerk.
if not sdwerk-low is initial.
itab-werks = sdwerk-low.
append itab.
endif.
if not sdwerk-high is initial.
itab-werks = sdwerk-high.
append itab.
endif.
endloop.
‎2007 Feb 09 5:45 AM