Ansicht
Dokumentation

PMMO_ME_PROCESS_PO - BAdI: Conversion Purchase Requisitions to Purchase Orders

PMMO_ME_PROCESS_PO - BAdI: Conversion Purchase Requisitions to Purchase Orders

PERFORM Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Use

Material requirements planning (MRP) typically creates purchase requisitions 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 purchase requisition in the PMMO_ASSIGNMENTtable. At a later point in time, the purchase requisition will be converted to a purchase order. When the pegging run is next executed, the purchase requisition assignment will be deleted and replaced by a purchase order assignment. However, some customers want to know the pegging of the purchase order as soon as the conversion takes place.

For this reason, PMMO provides the implementation PMMO_PROCESS_POwithin Business Add-In (BAdI) ME_PROCESS_POto convert purchase requisitions to purchase orders. This BAdI implementation modifies the PMMO_ASSIGNMENTtable accordingly at the time of conversion.

Notes:

  • The BAdI is called when the purchase order is saved.
  • Only schedule lines with an open quantity greater than null are considered.
  • If the pegging batch job runs at the same time as the purchase requisition is being converted to a purchase order, the pegging assignments are not created during the conversion of the purchase requisition to the purchase order.
  • The BAdI ME_PROCESS_POcan be implemented by SAP only. If you want to create your own implementation, you have to implement the BAdI ME_PROCESS_PO_CUSTinstead.

Requirements

Standard settings

Activities

  1. Execute the Customizing activity BAdI: Conversion Purchase Requisitions to Purchase Orders(Customizing path: Project Manufacturing Management and Optimization → Pegging → Business Add-Ins).
  2. Select the Active IMGcheckbox for BAdI implementation PMMO_PROCESS_PO.

Once you have activated the BAdI implementation, the system behavior is as follows during the conversion:

  • For each schedule line, the pegging assignments of the referenced purchase requisition are distributed proportionately based on the schedule line quantity up to the purchase requisition quantity. Any quantity that exceeds the referenced purchase requisition quantity is discarded. The pegging assignments of the referenced purchase requisition are reduced proportionally. If the purchase requisition quantity goes down to Null, the pegging assignments of the referenced purchase requisition are deleted.
  • If there are no pegging assignments of the referenced purchase requisition for the respective schedule line, the setting that has been configured via transaction MD04is called.
  • If the schedule line quantity is increased, the pegging assignments of the schedule line are proportionally increased up to the remaining purchase requisition quantity. The pegging assignments of the referenced purchase requisition are reduced proportionally. If the purchase requisition quantity goes down to Null, the pegging assignments of the referenced purchase requisition are deleted.
  • If the schedule line quantity is decreased, the pegging assignments of the schedule line are decreased proportionally. The pegging assignments of the referenced purchase requisition are increased proportionally.
  • If the referenced purchase requisition is replaced by another purchase requisition (for instance, PR1 is replaced by PR2), the current schedule line assignments are deleted and recreated based on the pegging assignments of the new purchase requisition (= PR2).
  • If there were pegging assignments of the original purchase requisition (= PR1), the pegging assignments of the original purchase requisition (= PR1) are increased proportionally.

  • If there were pegging assignments of the new purchase requisition (= PR2), the pegging assignments of the new purchase requisition (= PR2) are decreased proportionally.

  • If there are no pegging assignments of the referenced purchase requisition for the respective schedule line and the quantity of the schedule line is changed, the assignments will not be changed.
  • If the schedule line is deleted, the pegging assignments of the schedule line are deleted as well. The pegging assignments of the referenced purchase requisition are proportionally increased, as long as there are pegging assignments for the referenced purchase requisition.
  • If the purchase order item is deleted, the pegging assignments of the purchase order item are deleted as well. The pegging assignments of the referenced purchase requisition are proportionally increased, as long as there are pegging assignments for the referenced purchase requisition.
  • If the purchase requisition has an excess, the purchase order will also have excess assignment records in the in the proportional distribution of the referenced purchase requisition. The pegging assignments of the referenced purchase requisition are proportionally increased, as long as there are pegging assignments for the referenced purchase requisition.

In all cases mentioned above, the next pegging run will replace the entries by the actual pegging.

Example






rdisp/max_wprun_time - Maximum work process run time   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 5958 Date: 20240523 Time: 201133     sap01-206 ( 116 ms )