Skip to Content
0
Former Member
Nov 27, 2006 at 03:09 PM

loop statement

225 Views

Hi all ,

This is my code i have millons of records in MARA table . I dont have where condition for mara table also if loop that one it consumes lot of time . Is there any otheway to compare mara all entries which are suitale for cdpos with single attempt?

SELECT MATNR MTART ERSDA SPART ERNAM AENAM FROM MARA INTO TABLE IT_MARA.

Loop at it_mara => this statement consumes lot of time for me

SELECT * FROM cdpos INTO TABLE it_cdpos WHERE OBJECTID = it_mara-matnr

and tabname = 'mara' and fname = 'spart'.

loop at it_cdpos.

write:/ it_cdpos.

endloop

endloop.