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: 

MB5B is very slow

Former Member
0 Kudos

Dear Abappers,

I am trying to get the closing stock from MB5b but report is very slow. I tried the table MCHBH but closing stock do not match with mb5b.

I am getting the data period wise. Need your help to get the correct data.

Regards,

Aneel

1 ACCEPTED SOLUTION

thanga_prakash
Active Contributor

In addition to the above SAP note, there are plenty of notes available to improve the performance of MB5B, check it in SAP service marketplace and implement suitable SAP note.

9 REPLIES 9

thanga_prakash
Active Contributor
0 Kudos

Hi Aneel,

Refer to the SAP note # 1558298 :MB5B: Redesign of selection for performance optimization,

Implement the note and run the transaction.

Regards,

Thanga

thanga_prakash
Active Contributor

In addition to the above SAP note, there are plenty of notes available to improve the performance of MB5B, check it in SAP service marketplace and implement suitable SAP note.

0 Kudos

I want to get the closing stock from table MCHBH . There are many history tables but data do not match with MB5B. I need filters of Storage location, plants, batch and periods.

What can be the reason that closing stock of table MVHBH do not match with MB5B.?

Regards,

Aneel

0 Kudos

Hello Aneel,

I just did a small search in the transaction MB5B, i don't see the transaction refers to table MCHBH. It refers to table MCHB and many stocks table.

Regards,

Thanga

0 Kudos

Dear Thanga,

MCHB has no data of previous periods but only has data of current period.

MCHBH can be used to get data of previous months.

Regards,

Aneel

0 Kudos

Be aware that records are only inserted in tables 'M___H' (MCHBH, MARDH, MBEWH, etc) during period closing if data actually changed during the ending period. So a single SELECT or Browse of table may/will be insufficient.

You have to look for a previous record to find the value. (last history record before or equal the reference month/period, if none use current value from table without trailing 'H')

Hint: Look at a FM like MCHB_EXTEND (fill an itab from MCHB and execute FM on it) - Ref. 193554 - Stock/valuation data of previous periods

Regards,

Raymond

JL23
Active Contributor
0 Kudos

during period closing is no History table updated, this was so in ancient times, but has been changed long ago, see my document.

0 Kudos

Thanks for information, I didn't deduce the records were created during first movement of new period (MMPV is actually much too fast to do this )  I didn't practice much MM since 46c (ancient times?) nevtheless my old programs which used the EXTEND FM should be still valid.

Regards,

Raymond

0 Kudos

Dear Jurgen and Raymond,

Thanks for your help. But now how can I get  closing stock value now for previous periods.?

I don't want to use mseg table.

Regards,

Aneel