Ansicht
Dokumentation

W_ZF_ST_0372 - BAdI: Change Prepack Allocation Data Before Posting

W_ZF_ST_0372 - BAdI: Change Prepack Allocation Data Before Posting

General Data in Customer Master   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

With this BAdI you can modify the data before it will be posted by the prepack allocation planning. You have four methods available to tailor the application to your needs:

  • CHANGE_BEFORE_PREPACK_UPDATE.
    This method is called before prepack material related data is posted. It gets the current material data and the component data of the prepack to be created / changed and allows you to change the material data if you need to implement some customer-specific logic. You might wish to do so if you have extended one or more material master data tables or if you have a special reference logic for some specific fields.
  • CHANGE_BEFORE_PURCH_UPDATE
    This method is called before the purchasing info records of the prepack material are posted. It gets the current material data, the component data and the current information on the info records and allows you to change the info record data according to your needs.
  • CHANGE_BEFORE_LISTING_UPDATE
    This method is called after the posting modules for material data and component data have been called and before the listing conditions will be created / changed. It gets all current material data and listing conditions and allows you to change these data according to your needs.
  • CHANGE_BEFORE_ALLOC_UPDATE
    This method is called after all prepack data has been posted successfully and before the allocation planning data is posted into an allocation table. It gets all current data that will be passed to the allocation modules and allows you to change these data according to your needs.

For details on the parameter names and structure of all these methods, please refer to the interface of the method and to the ABAP Dictionary.

If you want to implement one or more of the above mentioned methods, you should be aware that the data you modifiy are directly passed to the posting modules without further check. So posting errors or wrong data might result if you don't perform all changes you need with care.

By filling the error message structure (type BAPIRETURN1), you can cause processing to stop if you fill in an error message other than a success message. You might wish to do so if the data contradicts some internal rules of your business and if you cannot change the data by the means of the corresponding method.

Please note that the BAdI only affects prepacks and allocation tables that are created with the new prepack allocation planning tool. The already existing transactions to create or change prepacks or allocation tables are not affected at all.

The implemented logic to determine the purchase price of a prepack is as follows: The purchase prices of the components are determined and summed up according to the relations between the components. If you don't want to calculate the purchase price of the prepack this way, you can overwrite this purchase price calculation manually. If you have a customer-specific logic to determine the purchase price, you might not wish to change the system proposal manually all the times. In this case you could implement the method CHANGE_BEFORE_PURCH_UPDATE to replace the calculated purchase price by your own price.






TXBHW - Original Tax Base Amount in Local Currency   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 3446 Date: 20240523 Time: 162248     sap01-206 ( 86 ms )