SAP ABAP IMG Activity BADI_ADPIC_HANDLE_PO (Add-In: Prepare PO for Mat. Exchange and Adjust PO After Mat. Exchange)
Hierarchy
ECC-DIMP (Software Component) DIMP
   IS-AD-MPN (Application Component) Manufacturer Part Number
     ADPIC (Package) A&D Parts Interchangeability Enhancements
IMG Activity
ID BADI_ADPIC_HANDLE_PO Add-In: Prepare PO for Mat. Exchange and Adjust PO After Mat. Exchange  
Transaction Code S_ALI_97000054   (empty) 
Created on 20040319    
Customizing Attributes BADI_ADPIC_HANDLE_PO   Add-In: Prepare PO for Mat. Exchange and Adjust PO After Mat. Exchange 
Customizing Activity BADI_ADPIC_HANDLE_PO   Add-In: Prepare PO for Mat. Exchange and Adjust PO After Mat. Exchange 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name BADI_ADPIC_HANDLE_PO    

Use

This BAdI is used in the component Manufacturer Part Number (IS-AD-MPN).

If any follow-on documents exist for the purchase order, for example invoices, sub-item creation (in other words, material exchange) would no longer be possible. This would also cause a failure in the method EXCHANGE_MAT_IN_PO of class CL_ADPIC_EXCHANGE_PO, which is called from MIGO, if a material exchange takes place from there.

The method PRE_PO_EXCHANGE of BAdI BADI_ADPIC_HANDLE_PO constitutes a solution to this impending problem. It receives the purchase order number, a table of items and a table, containing the user input from the goods movement via MIGO, as import parameters. With this information, it is possible, for example, to check for any follow-on documents.

If there are any, the customer has to decide how to react, for example, a message issued to the user or even the deletion of the respective follow-on document in order to enable a material exchange. The export table INFO_STORAGE passes any information needed to recreate the deleted follow-on document(s). It contains a customer include, which can be adjusted to suit individual requirements.

The method POST_PO_EXCHANGE of BAdI BADI_ADPIC_HANDLE_PO resets any changes that might have been made in method PRE_PO_EXCHANGE. The purchase order number and the contents of tables POITEM, INFO_STORAGE, RETURN (the return table of BAPI_PO_CHANGE) and IMSEG (the table, which contains the user input from the goods movement via MIGO) are passed to this method.

Note: the table IMSEG, which contains the user input from the goods movement via MIGO, does not contain the actual item numbers, because the item numbers for the sub-item creation are being determined later. The current item numbers can be found in table POITEM.

Note: you are not allowed to perform a commit work in any of these two BAdI methods.

Requirements

Standard settings

There is no standard implementation of this BAdI.

Activities

Example

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG BADI_ADPIC_HANDLE_PO 0 KAD0000008 Manufacturer Part Number 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20040319 
SAP Release Created in 500