‎2009 Feb 14 10:02 AM
Can we use pattern in the slect quiries with the FOR ALL ENTRIES clause.
Eg:
Select * into IT_MARA from MARA FOR ALL ENTRIES in IT_MARC where werks = IT_WERKS-WERKS.
IT_WERKS wil contain 10, 20, 30*
what option we can use instead of '=' in the select queries.
‎2009 Feb 14 10:21 AM
Hi Mohan,
In where addition we can use following comparison operator,between,like,in,is,in seltab,null,condition syntax,and or not , subquery, for all enteries.For the use of pattern i will prefer to validate the Werk field before using it in select query.Hoping your query resolves.We can use the pattern clause,though validating it before hand will be the best optyion as select query will not be complex.
Have a best day ahead.
‎2009 Feb 14 10:21 AM
Hi Mohan,
In where addition we can use following comparison operator,between,like,in,is,in seltab,null,condition syntax,and or not , subquery, for all enteries.For the use of pattern i will prefer to validate the Werk field before using it in select query.Hoping your query resolves.We can use the pattern clause,though validating it before hand will be the best optyion as select query will not be complex.
Have a best day ahead.
‎2009 Feb 14 4:00 PM
Hi Mohanraj ,
In Select query instead of = you can use in for select-options. But it is better = for this current example.
Thanks and regards
Pinaki
‎2009 Feb 16 4:50 AM
hi,
try this .
Select * into IT_MARA from MARA FOR ALL ENTRIES in IT_MARC where werks = IT_WERKS-WERKS.
IT_WERKS in (10, 20, 30* ).
OR
Select * into IT_MARA from MARA FOR ALL ENTRIES in IT_MARC where werks = IT_WERKS-WERKS.
IT_WERKS between 10* and 30*.
‎2009 Feb 19 11:57 AM
Hi,
use the following code.
Data: IT_WERKS2 like IT_WERKS OCCURS 0 WITH HEADER LINE..
IT_WERKS2[] = IT_WERKS[].
LOOP AT IT_WERKS2.
DO.
REPLACE '*' WITH '%' INTO IT_WERKS2-WERKS.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDDO.
MODIFY IT_WERKS2.
ENDLOOP.
Select * into IT_MARA from MARA FOR ALL ENTRIES in IT_MARC2
where werks LIKE IT_WERKS2-WERKS.
‎2009 Feb 19 10:29 PM
Hi,
Try to create a RANGE (R_WERKS) with the values 10, 20, 30* to use it in the WHERE condition.
Select *
into IT_MARA
from MARA
FOR ALL ENTRIES in IT_MARC
where werks in R_WERKS.
Additionally, you must avoid the use of Select * sentence to only specify the fields that you need.
hope this information is help to you.
Regards,
José
‎2010 Jun 24 10:12 AM