Ansicht
Dokumentation

PMMO_MD_PURREQ_CHANG - BAdI: Conversion of Planned Order to Purchase Requisitions

PMMO_MD_PURREQ_CHANG - BAdI: Conversion of Planned Order to Purchase Requisitions

ROGBILLS - Synchronize billing plans   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Use

Background: Material requirements planning (MRP) typically creates planned orders to fulfill various requirements during the MRP run. If you execute a pegging run (transaction PMMO_PEGGING), the system creates assignment record(s) for the planned order in the PMMO_ASSIGNMENT table. At a later point in time, the planned order can be converted to a purchase requisition. When the pegging run is next executed, the planned order assignment will be deleted and replaced by a purchase requisition assignment. However, some customers want to know the pegging of the purchase requisition as soon as the conversion takes place.

For that reason, PMMO provides the implementation PMMO_MD_PURREQ_CHG within the Business Add-In (BAdI) MD_PURREQ_CHANGE to update pegging when a planned order is converted to a purchase requisition. This BAdI implementation modifies the PMMO_ASSIGNMENT table accordingly at the time of conversion.

  • The following scenarios are addressed:
  • A full conversion of the total quantity
  • A partial conversion where the quantity of the planned order is reduced by the converted quantity
  • A conversion that increases the quantity so that the purchase requisition quantity is greater than the planned order quantity
  • A partial conversion of a planned order that has been pegged with an excess

Note: If you have your own implementation of BAdI MD_PURREQ_CHANGE you have to add the following code to method CHANGE_BEFORE_SAVE_CONV in interface IF_EX_MD_PURREQ_CHANGE:

DATA: lo_pmmo_convert_replens TYPE REF TO cl_pmmo_convert_replens.

lo_pmmo_convert_replens = cl_pmmo_convert_replens=>create( ).

lo_pmmo_convert_replens->update_orders2purchreq(is_eban = ch_eban;is_ebkn = ch_ebkn; is_plaf = im_plaf )

Requirements

Standard settings

Activities

  1. Execute the Customizing activity BAdI: Changing Purchase Requisitions.
  2. Activate the BAdI implementation PMMO_MD_PURREQ_CHG.

The system behaves as follows during the conversion:

  • If the planned order has not been previously pegged, temporary pegging assignments will be created for the purchase requisition.
  • If the planned order had been previously pegged, those pegging assignments will be modified or adjusted depending on the type of conversion (full or partial). The assignments inheriting from the planned order will also be adjusted.

In both cases, the next pegging run will replace the entries with the actual pegging.

Example






General Material Data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 3036 Date: 20240523 Time: 204412     sap01-206 ( 62 ms )