Register Login

ME87: error in connection with material ledger

Updated May 18, 2018

Problem

You want to aggregate an order history for a scheduling agreement with an active material ledger via Transaction ME87 (or via report RM06EKBE). When doing so, the following errors may occur:

Transaction ME87 runs, but the values in parallel currencies are aggregated incorrectly.With further postings to aggregated purchase order items, the system issues error message C+507 ("ML currencies missing in the MLBECR for the EKBE-&1 (3)").
An ABAP runtime error (dump) occurs in ME87 with the termination message: ABAP runtime error 'SAPSQL_ARRAY_INSERT_DUPREC'.The termination occurs in function module: CKMW_POST_PO_HISTORY.The purchase order item is not aggregated.

The error only occurs if you want to aggregate a scheduling agreement for a plant in which the material ledger is active.

Solution

Make the following changes:
First, you must create two new tables on the database.

1. Call up Transaction SE11 for this and select database table MLBE.Now choose 'Copy' and copy the table to the new MLBEH table.
Save and generate the new MLBEH table.

2. Call up Transaction SE11 for this and select database table MLBECR. Then choose 'Copy' and copy the table to the new MLBECRH table.
Save and generate the new MLBECRH table.

3. In addition, you must enhance the import parameters of the following function module with an optional parameter:
Call Transaction SE37 and enter function module CKMW_MODIFY_CONDENSED_POH_EKBE
Par. name      Type spec.  Ref.type    Deflt.val. Opt.  Pass value
LBZAEHL        TYPE        EKBE-BUZEI            X
Save and activate afterwards.

4. In addition, you must enhance the import parameters of the following function module with an optional parameter:
Call Transaction SE37 and enter function module CKMW_REPLACE_AND_POST_POH
Choose 'Change'; choose the 'Import' tab page:
Par. name      Type spec. Ref.type    Deflt.val. Opt. Pass value
I_AUFL         TYPE        C          SPACE      X
I_EBELN        TYPE        EBELN                X
I_EBELP        TYPE        EBELP                X
Save and activate afterwards.

5. Finally, implement the attached program corrections.

It is absolutely necessary that you check whether you have implemented all the related notes.


 


×