‎2007 Nov 02 6:29 AM
Hi all,
I want to use pattern while selecting data from the table .
Example.
p_matnr = abc12*
p_werks = *
select * from mara where matnr = p_matnr and werks = p_werks
how should be the coding while using the search pattern as given above p_matnr = abc12*
‎2007 Nov 02 6:34 AM
Hi
Use LIKE in the where condition to select the pattern related data like
select * from mara where matnr like 'ABC12%'.
see the correct syntax by pressing F1
Regards
Anji
‎2007 Nov 02 6:34 AM
Hi
Use LIKE in the where condition to select the pattern related data like
select * from mara where matnr like 'ABC12%'.
see the correct syntax by pressing F1
Regards
Anji
‎2007 Nov 02 6:35 AM
select * from MARA into table IT_MARA where MATNR like 'ABC12%'.This can be used for ur purpose. Use of % gets all the Materials starting with ABC12%
Regards
Gopi
‎2007 Nov 02 6:48 AM
better you declare like this
tables : marc.
select-options : p_matnr for marc-matnr no-extension no intervals,
p_matnr for marc-werks no-extension no intervals.
select * from marc where matnr in p_matnr and werks in p_werks.
It will be easier other wise you have to write lot of codes to change the * in parameter to %. And then you have to use in like.
Regards
shiba dutta