SAP ABAP IMG Activity /TDAG/CP_BADI_008 (BAdI: Enhancement of Task Activities)
Hierarchy
TDAGBCA (Software Component) TechniData Basic Components
   EHS (Application Component) Environment, Health and Safety
     /TDAG/CP (Package) Compliance for products
IMG Activity
ID /TDAG/CP_BADI_008 BAdI: Enhancement of Task Activities  
Transaction Code /TDAG/13000050   (empty) 
Created on 20130607    
Customizing Attributes /TDAG/CP_BADI_008   BAdI: Enhancement of Task Activities 
Customizing Activity /TDAG/CP_BADI_008   BAdI: Enhancement of Task Activities 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name /TDAG/CP_BADI_008    

Use

This Business Add-In (BAdI) is used in the SAP Product and REACH Compliance component. This BAdI enables you to implement custom activities for Task Management. It provides the following methods:

  • Method GET_INITIAL_ACTIVITY is called in the task creation immediately after the task generation to determine an activity that can be executed immediately (parameter E_ACTIVITY) from the header data of the newly created task (parameter XS_TASKH). If this method returns an activity, this activity is executed, otherwise the system uses the activity ASIGN in accordance with the configuration of the task types.
  • Method PROCESS is called if none of the default activities are used. The method returns the changed task details as well as the next status (E_NEXT_STATUS) that may differ from the next status of the status network. The termination of the processing of the current activity can be signalled with the cancellation indicator (E_FLG_CANCEL). In addition, the error indicator (E_FLG_FAIL) triggers the end of the processing and messages can be issued using the message table. This message is responsible for uploading all file attachments into the DMS and for saving the task texts as SAPSCRIPT data. For this purpose, you can use the following function modules: /TDAG/CP_TR02_DOCU_ATT uploading the content of the file attachments to the DMS and delivering the relevant DMS keys in the parameter XST_TASKD, /TDAG/CP_TR02_TEXT_PROCESSING saving the task text in SAPSCRIPT and updating the task item accordingly. Either of these function modules executes a COMMIT during processing. After the method, task management is responsible for saving the changed task. This method supports following parameters:
    • I_ACTIVITY contains the current activity.
    • I_NEXT_STATUS transfers the next status that was determined from the status network.
    • I_FLG_WITH_DIALOG controls whether a dialog can be displayed. This parameter is set by the task management to suppress dialogs in background processing.
    • I_DOCTEXT transfers the default text for the current step.
    • The parameters XS_TASKH, XS_TASKI, XT_TASKTXT, XTS_TASKATT, and XTS_TASD provide the current task data for processing.
  • You can use method ADJUST_TOOLBAR_MAIN to adjust the toolbars of the task management hit list.
  • You can use method ADJUST_TOOLBAR_ITEM to adjust the toolbars of the the task items.
  • You can use method ADJUST_TOOLBAR_DOC to adjust the toolbars of the task documents (ADJUST_TOOLBAR_DOC) after they have been prepared for the task.
  • Method PROCESS_OK_CODE_MAIN is used to process the events of toolbar elements that were added with the method ADJUST_TOOLBAR_MAIN. Using an error indicator (E_FLG_FAIL), errors can be returned to task management and messages can be issued using the message table. In additon, an update of the data of the relevant screen area is triggered by the refresh indicator (E_FLG_NEED_RERESH). All currently selected tasks from the hit list are transferred to this method for processing.
  • Method PROCESS_OK_CODE_ITEM is used to process the events of toolbar elements that were added with the method ADJUST_TOOLBAR_ITEM. Using an error indicator (E_FLG_FAIL), errors can be returned to task management and messages can be issued using the message table. In additon, an update of the data of the relevant screen area is triggered by the refresh indicator (E_FLG_NEED_RERESH). The currently selected task item is transferred to this method for processing.
  • Method PROCESS_OK_CODE_DOC is used to process the events of toolbar elements that were added with the method ADJUST_TOOLBAR_DOC. Using an error indicator (E_FLG_FAIL), errors can be returned to task management and messages can be issued using the message table. In additon, an update of the data of the relevant screen area is triggered by the refresh indicator (E_FLG_NEED_RERESH). The currently selected task document is transferred to this method for processing.

Requirements

Standard settings

In the standard system, the Business Add-In is not activated. The default implementation is executed as long as you do not activate a customer-specific implementation.

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.

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 /TDAG/CP_BADI_008 0 HLA0003435 Environment, Health and Safety 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on ESCHST  20130607 
SAP Release Created in 110_600