Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Performance Issue While Fetching Record From MBEW Table

Hi,

We are fetching records from mbew table using key fields matnr,bwkey.

When we use for all entries option in select statement the system gets hang.

So we are using concept of package size to increase the performance.

It works fine for minimum no of records but for large no of records it doesnt work.

Kindly guide us thru efficient way to resolve this issu.

The code is attached herewith for your reference

SELECT * FROM mard

INTO TABLE it_mard_temp package size 400

FOR ALL ENTRIES IN it_s033

WHERE matnr EQ it_s033-matnr

AND werks EQ it_s033-werks.

IF sy-subrc EQ 4.

MESSAGE e002(sy) WITH 'Record not found'.

ENDIF.

IF it_mard_temp[] IS NOT INITIAL.

SELECT matnr

bwkey

verpr FROM mbew

INTO TABLE it_mbew_temp

FOR ALL ENTRIES IN it_mard_temp

WHERE matnr = it_mard_temp-matnr

AND bwkey = it_mard_temp-werks.

ENDIF.

append lines of it_mard_temp to it_mard.

append lines of it_mbew_temp to it_mbew.

refresh: it_mard_temp,it_mbew_temp.

endselect.

With Regards

***************************Point is assured **********************

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question