SAP ABAP IMG Activity W_MDS_0006 (BAdI: Definition of Document Type for Collective Purchase Order)
Hierarchy
BBPCRM (Software Component) BBPCRM
   LO-MDS (Application Component) Merchandise Distribution
     WFRM (Package) ISR: Cross-Docking and Floor-Ready Merchandise
IMG Activity
ID W_MDS_0006 BAdI: Definition of Document Type for Collective Purchase Order  
Transaction Code S_AL0_96000466   (empty) 
Created on 20011127    
Customizing Attributes W_MDS_0005   BAdI: Control for Creating Follow-On Documents in Merchandise Distribution 
Customizing Activity W_MDS_0006   BAdI: Definition of Document Type for Collective Purchase Order 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name WFRM_DET_ORDER_TYPE    

Use

This Business Add-In (BAdI) allows you to use your own customer-defined order type in collective purchase orders.

You normally use the document type that is used for the relevant plant in Purchasing Customizing as the default order type for creating a collective purchase order. Should you use an order type that is different to the default order type, you can use this Business Add-In to define and assign your own order type.

When you create the collective purchase order (transaction WF10), the BAdI is called immediately after the standard document type stored in Customizing has been defined. You can then change this standard document type in the BAdI.

Subsequently, no further checks are carried out on the order type that is returned from the BAdI. For example, there is no check on whether the order type is even allowed to be used in the current process. The system tries to create the purchase order with this order type. If the document type is not allowed, then the system terminates the purchase order generation and you will receive an error message.

Standard settings

In the standard system the BAdI is not activated and there is no default coding.

The BAdI cannot be used more than once and is not filter-dependent.

Activities

Nach dem Aufrufen der IMG-Aktivität gelangen Sie zunächst auf ein Dialogfenster, in dem Sie einen Namen für die Implementierung eingeben.

Falls bereits Implementierungen zu diesem BAdI angelegt wurden, gelangen Sie auf ein Dialogfenster, in dem die existierenden Implementierungen angezeigt werden. Wählen Sie in diesem Dialogfenster Anlegen und fahren Sie wie folgt fort:

  1. Geben Sie im Dialogfenster im Feld Implementierung einen Namen für die Implementierung des BAdIs ein und wählen Sie danach Anlegen.

    Sie gelangen auf das Einstiegsbild zum Anlegen von BAdI-Implementierungen.

  2. Geben Sie in dem Einstiegsbild im Feld Kurztext zur Implementierung einen Kurztext für die Implementierung ein.
  3. Wählen Sie im Registerindex Interface.

    Auf der Registerkarte ist das Feld Name der implementierten Klasse automatisch gefüllt, da das System aufgrund des Namens Ihrer Implementierung einen Klassennamen vergibt.

  4. Sichern Sie Ihre Eingaben und nehmen Sie die Zuordnung zu einer Entwicklungsklasse vor.
  5. Positionieren Sie den Cursor jeweils auf der Methode und verzweigen Sie per Doppelklick in die Methodenbearbeitung.
  6. Geben Sie zwischen den Anweisungen method <Interface-Name>~<Name der Methode>. und endmethod. das von Ihnen gewünschte Coding zur Implementierung ein.
  7. Sichern und aktivieren Sie Ihr Coding und navigieren Sie zurück zum Bild Ändern Implementierung.
  8. Sichern Sie auf dem Bild Ändern Implementierung.

    Hinweis: Es ist ebenfalls möglich, für ein BAdI zunächst eine Implementierung anzulegen und diese später zu aktivieren. In diesem Fall schließen Sie die Bearbeitung zum jetzigen Zeitpunkt ab.

  9. Wählen Sie Aktivieren.

    Bei der Ausführung des Anwendungsprogramms wird jetzt das von Ihnen in der Methode hinterlegte Coding durchlaufen.

Example

When the BAdI is called, tbe system transfers the defaulted document type A to the BAdI for the current process (for example, the purchase order from distribution center XY is transferred to vendor Z). If you want to restrict purchase orders that have been created manually in a collective purchase order using your own document type, you can change the document type A that was transferred in the BAdI to document type B so that you can control special processes for a collective purchase order, for example.

Furthermore, additional information is delivered to the Business Add-In concerning the vendor, plant, purchasing organization, and so on, and this information can be used to define the document type.

Documentation on the BAdI method DETERMINE_ORDER_TYPE

Business Attributes
ASAP Roadmap ID 153   Design enhancements 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 1   Critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20011204 
SAP Release Created in 470