SAP ABAP IMG Activity /CWM/CREATE_DELIVERY (BAdI: Creation of a Delivery)
Hierarchy
IS-CWM (Software Component) Industry Solution Catch Weight Management
   IS-CWM (Application Component) Industry Solution Catch Weight Management
     /CWM/APPL_MM (Package) Inventory Management
IMG Activity
ID /CWM/CREATE_DELIVERY BAdI: Creation of a Delivery  
Transaction Code /CWM/15000032   (empty) 
Created on 20050303    
Customizing Attributes /CWM/CREATE_DELIVERY   BAdI: Creation of a Delivery 
Customizing Activity /CWM/CREATE_DELIVERY   BAdI: Creation of a Delivery 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name /CWM/CREATE_DELIVERY    

Use

Business Add-In (BAdI) /CWM/CREATE_DELIVERY is used in the Catch Weight Management (IS-CWM) component.

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.

Requirements

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.

Standard settings

  • 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.

Activities

After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.

If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:

  1. In the dialog box, enter a name for the implementation of the Add-In and choose Create.
    The system displays the initial screen for creating Business Add-In implementations.
  2. On this screen, enter a short description for your implementation in the Implementation Short Text field.
  3. If you choose the Interface tab, you will notice that the system has populated the Name of the Implementing Class field automatically, by assigning a class name based on the name of your implementation.
  4. Save your entries and assign the Add-In to a package.
  5. To edit a method, double-click its name.
  6. Enter your implementation code between the method <Interface Name>~<Name of Method>. and endmethod. statements.
  7. Save and activate your code. Navigate back to the Change Implementation screen.
    Note: You can also create an implementation for an Add-In and not activate it until later. If you want to do this, do not perform the following step:
  8. Choose Activate.
    When the application program is executed, the code you created is run through.

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.

Example

METHOD /cwm/if_ex_create_delivery~create_delivery .

FIELD-SYMBOLS: <fs_imseg> TYPE imseg.

LOOP AT it_imseg ASSIGNING <fs_imseg>

WHERE werks > '1000'

AND werks < 'Z200'.

e_create_delivery = 'X'.

EXIT.

ENDLOOP.

ENDMETHOD.

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 /CWM/CREATE_DELIVERY 0 /CWM/SO70000001 Industry Solution Catch Weight Management 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20050303 
SAP Release Created in 200