Skip to Content
0
Former Member
Dec 05, 2007 at 06:01 AM

performance tuning

15 Views

how do i rewrite the following using "for all entries" to improve performance?

DATA: BEGIN OF I_MARA OCCURS 0,

MATNR LIKE MARA-MATNR,

MTART LIKE MARA-MTART,

END OF I_MARA.

DATA : BEGIN OF I_SER01 OCCURS 0,

LIEF_NR LIKE SER01-LIEF_NR,

OBKNR LIKE SER01-OBKNR,

POSNR LIKE SER01-POSNR,

BWART LIKE SER01-BWART,

END OF I_SER01.

DATA : BEGIN OF I_OBJK OCCURS 0,

OBKNR LIKE OBJK-OBKNR,

SERNR LIKE OBJK-SERNR,

MATNR LIKE OBJK-MATNR,

END OF I_OBJK.

loop at i_ser01.

SELECT bobknr amatnr b~sernr FROM mara AS a INNER JOIN

objk AS b ON bmatnr = amatnr INTO TABLE i_objk FOR ALL ENTRIES IN i_ser01

WHERE b~obknr = i_ser01-obknr

AND b~sernr IN sernr

AND a~mtart = 'FERT'

AND a~matnr IN matnr.

endloop