SAP ABAP IMG Activity DIWPS_ORDER_CREATE (BAdI: Order Creation)
Hierarchy
ECC-DIMP (Software Component) DIMP
   IS-AD-MEB (Application Component) Line Maintenance Planning (MEB Enhancements)
     DIWPS_AD (Package) DI: Work Packaging and Sequencing (A&D)
IMG Activity
ID DIWPS_ORDER_CREATE BAdI: Order Creation  
Transaction Code S_KA5_12001404   SAPLS_CUS_IMG_ACTIVITY 
Created on 20030109    
Customizing Attributes DIWPS_ORDER_CREATE   BAdI: Order Creation 
Customizing Activity DIWPS_ORDER_CREATE   BAdI: Order Creation 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name DIWPS_ORDER_CREATE    

Use

You use this Business Add-In (BAdI) to change the logic of the order creation from a revision.

All methods for this BAdI can be implemented independently of one another, so that the standard implementation can be used for certain parts.

In the standard logic, the order creation is carried out in the class CL_REVISION_WPS and the method REVISION_CREATE_ORDERS. The following methods are called in the following sequence:

  1. RV_GET_NOTIS_WITH_TLH
    This method returns all notifications that belong to the revision, and groups the notifications according to the following criteria:
    • With a task list
    • Without a task list
  2. RV_EXPLODE_TLH_FOR_NOTIS
    The import parameters for this method are notifications with a task list hierarchy (NOTIFICATIONS) and revision reference. The task list hierarchy in NOTIFICATIONS is used to explode the assigned task lists. The export parameter CROSS_REF_BT contains the cross-reference data of revision and notification with all the exploded task lists.
    During the explosion, the indicator NO_EXEC_FLG (Do not execute) is set for the task lists that are excluded, that is, the exclusion indicator is set. If the parameter CROSS_REF_BT is initial or the explosion was not carried out, an exclusion is displayed.
  3. RV_TLH_ELIMINATE_EXCLUDED
    The change parameter of this method (CROSSREF_BT) contains the cross- reference data for revisions and notifications. All task lists for which the exclusion indicator is set in another task list hierarchy are deleted.
    you have two notifications for example: Notification 1 and notification 2. AP1 is set as the exclusion indicator under notification 1. This method eliminates all other instances of AP1 by setting the NO_EXEC_FLG (Do not execute) indicator for the relevant entry in the cross-reference table CROSSREF_BT. AP1 is therefore deleted under notification 2.
    The export parameter EXCLUDED_PASSIVES contains all excluded cross-references. This parameter is used to log messages in the revision log.
  4. RV_DETERMINE_ORDER_UPDATES
    This method checks if the existing order for a notification can be used again for a new notification. The change parameter CROSS_REF_BT contains all cross-references between revisions and notifications after the task list hierarchy explosion.
    The indicator NO_EXEC_FLG (Do not execute) is set for all cross- references with a notification status that does not allow order creation. The export parameter NEW_EXEC_TL contains all task lists for the orders that can be created. The export parameter INACTIVATE_ORDERS returns all orders that must be deactivated.
    You can use the method for the following:
    • In the cross-reference table CROSS_REF_BT, check whether the notification status allows order creation. If order creation is not allowed, the execution indicator is not set for the relevant cross-reference.
    • Determine the order type of all notification types in the cross-reference for which the Do not execute indicator is set.
    • Check the task list key to see if an existing order can be used again.
    • Find all task lists for which orders can be created, and group them under NEW_EXEC_TL.
    • Find all orders that can be deactivated, and group them under INACTIVATE_ORDERS.
  5. ORDER_CREATE
    This method creates orders for notifications with active task lists. The export parameter EXEC_TL contains all task lists for the orders that can be created (EXEC_TL is determined in the method RV_DETERMINE_ORDER_UPDATES).
    The import parameter IS_PARALLEL determines whether the order creation should take place normally or in parallel. If there are duplicate task lists, the method ensures that orders are deleted. The change parameter CROSSREF_BT contains the cross-references between revisions and notifications. All cross-references are modified accordingly based on the order creation.
  6. CROSSREF_BT_MAINTAIN
    If orders are successfully created, the cross-reference buffer table CROSS_REF_BT is updated with the new temporary order number.
  7. REVISION_STATUS_CHANGE
    This method resets the status of the revision to AFEE (order creation required).
  8. NOTI_STATUS_CHANGE
    This method sets the status of the notifications to AFER (order created by MEB).

Requirements

Standard settings

This BAdI is not designed for multiple use.

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

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.

Example

Further notes

Documentation on BAdI Method TLH_EXPLOSION_UPDATE

Documentation on BAdI Method TLH_EXCLUSION

Documentation on BAdI Method DETERMINE_ORDER_UPDATES

Documentation on BAdI Method ORDERS_CREATE

Documentation on BAdI Method FILL_PARAM_ORDER_GENER

Documentation on BAdI Method CONFIGURATION_SET

Documentation on BAdI Method SET_TLH_EXPLOSION_DATE

Business Attributes
ASAP Roadmap ID 204   Establish Functions and Processes 
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 DIWPS_ORDER_CREATE 0 PLN0000022 Revision Planning 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20030703 
SAP Release Created in 471