Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

report performance

george_paraschiv
Explorer
0 Kudos

Hello,

I have a performance issue. I have to write a report to display items without goods receipt in the last 30 days. Tha only way I could do it was to select ALL active materials , store the results in an internal table and then loop on that internal table and check in MSEG if there is an goods receipt for each material. If I found a goods receipt for the current material I delete that item from the internal table. If not, skip to the next record.

This works fine, but it takes very long to do it. Is there another way ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

George,

Is your requiremnt Different than what MB51 Transaction does?

Have a look into it.

Regds,

Mano Sri

4 REPLIES 4

former_member927251
Active Contributor
0 Kudos

Hi George,

Use the following :

DELETE itab WHERE good_receipt IS INITIAL.

<b>Reward points if it helps.</b>

Regards,

Amit Mishra

Former Member
0 Kudos

George,

Is your requiremnt Different than what MB51 Transaction does?

Have a look into it.

Regds,

Mano Sri

0 Kudos

Yes, I have to display the materials with no moovement type 101 in the last 30 days.

0 Kudos

Ok, Lets go teh same way for step one.

1.Collect all teh active materials say itn otabel it_matnr.

2. Now at step to collect all the materials from MSEG where Movment type is 101 int ot ranages say r_matnr

soemthing like

select matnr

from mseg

into r_matnr-low

where mobtyp = 101

r_sign = 'I'.

r_option = 'EQ'.

append r_matnr.

endselect.

Now step 3.

Delet it_matnr where matnr in r_matnr.

you will be left out with material that dont have movemnet type 101.

Idea is to use ranges and delete at oen shot instead of loop.

Please check this , i hope it should help.

Rgds,

Mano Sri