Ansicht
Dokumentation

/CWM/CREATE_DELIVERY - BAdI: Creation of a Delivery

/CWM/CREATE_DELIVERY - BAdI: Creation of a Delivery

Addresses (Business Address Services)   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Business Add-In (BAdI) /CWM/CREATE_DELIVERY is used for CW materials.

You can use this BAdI to trigger creation of a delivery.

You can implement this BAdI if you use Warehouse Management and the actual quantities are not known when quantities are entered in MIGO, for example, because there is no means of weighing the material. You enter a quantity that can only be displayed correctly once a transfer order has been confirmed in Warehouse Management. A delivery is therefore created first and a material document is only created once confirmation has been received with the correct quantities.

If no delivery is created, the material document is posted directly, and a transfer requirement is created, the quantities can no longer be changed after confirmation is made in Warehouse Management.

The BAdI is only called in the following situations:

  • You are posting a goods movement with transaction MIGO.
  • At least one storage location for the items is managed by the WM system.
Exception: In the case of a posting change in lean Warehouse Management.
  • If the system has already decided to generate a delivery, the BAdI is no longer called.
  • The Business Add-In is not active in the standard system.
  • No default coding exists.
  • The Busines Add-In is not filter-dependent.
  • The Business Add-In is not designed for multiple use.

After you have called the IMG activity, proceed as follows:

  1. In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
  1. In the corresponding field, enter a short text for implementation .
  2. In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
  3. Choose the tab Interface.
The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
  1. Save your entries and assign a package.
  2. Position the cursor on a method. Call up the Class Builder by double-clicking it.
  3. Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
  4. Save and activate your coding, and navigate back to the screen Change Implementation.
  5. Save on the screen Change Implementation.
Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
  1. Choose Activate.
When the application program is executed, the coding you have created will be run.

Create implementation

The BAdI definition /CWM/DEFAULT_MIGO was created with transaction SE18.

You can use transaction SE19 to create an implementation for this BAdI. You can provide method CREATE_DELIVERY with customer-specific coding.

If the E_CREATE_DELIVERY indicator is not initial when you leave method CREATE_DELIVERY, the system creates a delivery.

METHOD /cwm/if_ex_create_delivery~create_delivery .

  FIELD-SYMBOLS: TYPE imseg.

  LOOP AT it_imseg ASSIGNING

    WHERE werks > '1000'

      AND werks < 'Z200'.

    e_create_delivery = 'X'.

    EXIT.

  ENDLOOP.

ENDMETHOD.






Vendor Master (General Section)   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 4767 Date: 20240502 Time: 000906     sap01-206 ( 70 ms )