‎2008 Apr 30 5:34 AM
Hi All,
I have to create a report where I have to use SELECT-OPTIONS for vendor number. If user does not enter the vendor number (vendor-low and vendor-high are blanks) then I have to select records for all vendors. If user enters a range or individual vendor numbers and I have to select only the entered vendor numbers. How I can do this?
‎2008 Apr 30 5:35 AM
just use select-options : s_lifnr for lfa1-lifnr.
and in your selection query, use
where
lifnr in S_lifnr.
the system will automatically take care of the rest. ..that means, the system will pick only those vendors, if something is specified in s_lifnr, else, it will pick for all vendors..
SAP is intelligent, right ??
‎2008 Apr 30 5:35 AM
just use select-options : s_lifnr for lfa1-lifnr.
and in your selection query, use
where
lifnr in S_lifnr.
the system will automatically take care of the rest. ..that means, the system will pick only those vendors, if something is specified in s_lifnr, else, it will pick for all vendors..
SAP is intelligent, right ??
‎2008 Apr 30 5:38 AM
hi,
do this way ..
select * from lfa1 into table it_lfa1 where lifnr in s_lifnr.
Regards,
Santosh
‎2008 Apr 30 5:40 AM
Hi,
Just try this.
select *
into table <internal table>
from <DB table>
where lfa1 in s_vendor.
regards
raam
‎2008 Apr 30 6:41 AM
Hi,
Use like this,
Select-options : vendor for lfa1-lifnr.
data : itab like lfa1 occurs 0 with header line.
in select Query,
Select * from lfa1 into itab where lifnr in vendor.