04-27-2009 12:49 PM
Hi,
I have to pass to select statement like TW% and TI%. means only need to fetch Company code related to TW% and TI%. Can anycody advise me how to get.
04-27-2009 12:51 PM
hi,
use it in this fashion,
data t_scarr type table of scarr.
select * from scarr
into table t_scarr
where carrid like 'A%'.
data wa type scarr.
loop at t_scarr into wa.
write / wa-carrid.
endloop.
Regards,
Siddarth
04-27-2009 12:53 PM
Try this Query
select * from dbtable into table itab where bukrs like 'TW%' and bukrs like 'TI%'.
04-27-2009 12:55 PM
>
> Try this Query
>
>
select * from dbtable into table itab where bukrs like 'TW%' and bukrs like 'TI%'.
Won't work with AND - the same BUKRS value cannot satisfy both conditions. Will work with OR.
04-27-2009 1:12 PM
Hi Christin,
U r right it will not work, is there any way to get the records by passing both the company codes with wildcard characters.
04-27-2009 1:14 PM
>
> Hi Christin,
>
> U r right it will not work, is there any way to get the records by passing both the company codes with wildcard characters.
Yes. Replace the AND with an OR (as I said).
04-27-2009 1:44 PM
But do you really want to 'hardcode' these Company codes? It would be better to use select options (if you are writing a report, or use 'ranges' (not the oldfashioned ones created with keyword RANGES, but rather selfdefined select options).
04-27-2009 1:46 PM