Ansicht
Dokumentation

PPH_MRP_PURREQ_CFL - BAdI: Purchase Requisition Enhancements for MRP

PPH_MRP_PURREQ_CFL - BAdI: Purchase Requisition Enhancements for MRP

TXBHW - Original Tax Base Amount in Local Currency   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in component PP-MRP (material requirements planning (MRP)) when creating purchase requisitions and converting planned orders into purchase requisitions. You can use this BAdI to fill additional custom fields on purchase requisition item level when creating or changing a purchase requisition. Also, when purchase requisitions are created in MRP or when converting a planned order, you can use this BAdI to fill or change the content of standard fields of purchase requisitions.

  • In the standard system, the BAdI is not active.
  • The BAdI is filter independent.

With the Custom Logic app, you can create exactly one active implementation.

For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).

BAdI Method MODIFY_PURREQ:

In the implementation you can use the following import parameters to calculate values for your own fields:

Import parameters:

  • PROCESSING_STATUS
Processing status of the purchase requisition during MRP and/or planned order conversion. The following values are possible:
  • 'H' - Creation of a new purchase requisition during MRP

  • 'V' - Change of an existing purchase requisition during MRP

  • 'K' - Creation of a new purchase requisition through total planned order conversion

  • 'T' - Creation of a new purchase requisition through partial planned order conversion

  • PURCHASEREQUISITION
This structure contains the key data of the purchase requisition item (PURCHASEREQUISITION, PURCHASEREQUISITIONITEM) as well as the most important purchase requisition data.

Changing parameters:

  • PURCHASEREQUISITION_CHANGED
The custom fields that you have to fill during the BAdI implementation are located in this changing parameter.
Please note that you must provide the key field of the purchase requisition item (PURCHASEREQUISITION, PURCHASEREQUISITIONITEM).
In case of purchase requisition changes you have to copy the custom fields you want to keep from the import parameter (which may already have been filled by a previous data transfer). See example implementation.

are located in this changing parameter.

Please note that you must provide the key field of the purchase requisition item (PURCHASEREQUISITION, PURCHASEREQUISITIONITEM).
In case of purchase requisition changes you have to copy the custom fields you want to keep from the import parameter (which may already have been filled by a previous data transfer). See example implementation.

The provided example class CL_EX_PPH_MRP_PURREQ_CFL has implemented the following behavior:

It has two different logics implemented; one that is executed for new purchase requisitions created by MRP or during planned order to purchase requisition conversion and another that is executed when purchase requisitions are changed by MRP.

For newly created purchase requisitions the custom fields are only filled for subcontracting purchase requisitions (based on item category = '3') and if the ordered quantity of the purchase requisition is greater than 100.

For changed purchase requisitions, the logic checks the inventory special stock type and copies it to the custom fields as soon as the special stock type is filled.

In both cases, the custom fields that are not changed by the implementation are simply copied over.






TXBHW - Original Tax Base Amount in Local Currency   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 4175 Date: 20240523 Time: 195956     sap01-206 ( 66 ms )