‎2007 Jan 05 3:32 PM
Dear experts,
I need to display the range of vendor no in my report,
could anyone pls give me the code to define range and select vendor accordingly
thanks in advance
kar
‎2007 Jan 05 3:36 PM
Hi,
Try this.
TABLES: LFA1.
SELECT-OPTIONS: S_LIFNR FOR LFA1-LIFNR.
SELECT LIFNR
INTO TABLE I_LFA1
FROM LFA1
WHERE LIFNR IN S_LIFNR.Regards,
Ferry Lianto
‎2007 Jan 05 3:36 PM
data : begin of it_ranges occurs 0,
sign(1),
option(2),
low like lfa1-lifnr,
high like lfa1-lifnr,
end of it_ranges.
select lifnr into table it_lifnr from lfa1 where lifnr in it_ranges.
‎2007 Jan 05 3:45 PM
Dear Chandrasekar
Can i declar like below
SELECT-OPTIONS: S_LIFNR FOR LFA1-LIFNR.
what is the difference with the above code and your code.
data : begin of it_ranges occurs 0,
sign(1),
option(2),
low like lfa1-lifnr,
high like lfa1-lifnr,
end of it_ranges.
select lifnr into table it_lifnr from lfa1 where lifnr in
it_ranges.
pls explain
‎2007 Jan 05 3:49 PM
with the first case
SELECT-OPTIONS: S_LIFNR FOR LFA1-LIFNR
user has to give input
In my case there is no need for user to give input , u can build your own LIFNRs like this
it_ranges-sign = 'I'.
it_ranges-option = 'BT'.
it_ranges-low = '00001234'.
it_ranges-high = ' '.
append it_ranges.
clear it_ranges.
it_ranges-sign = 'I'.
it_ranges-option = 'BT'.
it_ranges-low = '0005678'.
it_ranges-high = ' '.
append it_ranges.
clear it_ranges.
‎2007 Jan 05 3:42 PM
You define ranges like this:
ranges: s_lifnr for lfa1-lifnr.
Thanks,
Santosh
‎2007 Jan 05 3:50 PM
Hi Karthik,
Yes, you can declare below code for your selection screen report to get range of vendor.
SELECT-OPTIONS: S_LIFNR FOR LFA1-LIFNR.
if you do not want to display in your selection screen then you can use RANGE statement.
No need to declare an internal table like above code.
RANGES: R_LIFNR FOR LFA1-LIFNR.
Hope this will help.
Regards,
Ferry Lianto