SAP ABAP IMG Activity EHSW_MN_SAVE_TO_DB (BAdI: Save Additional Disposal Document Data)
Hierarchy
EA-APPL (Software Component) SAP Enterprise Extension PLM, SCM, Financials
   EHS-WA (Application Component) Waste Management
     CBWA (Package) EH&S: Waste Management
IMG Activity
ID EHSW_MN_SAVE_TO_DB BAdI: Save Additional Disposal Document Data  
Transaction Code S_AEN_10000073   (empty) 
Created on 20041018    
Customizing Attributes EHSW_MN_SAVE_TO_DB   BAdI: Save Additional Disposal Document Data 
Customizing Activity EHSW_MN_SAVE_TO_DB   BAdI: Save Additional Disposal Document Data 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name EHSW_MN_SAVE_TO_DB    

Use

This Business Add-In (BAdI) is used in the Waste Management (EHS-WA) component.

With this BAdI you can save additional disposal document data in the database. The BAdI is called when you save disposal document data.

Requirements

The additional data to be saved must be determined at PAI and collected in a buffer in your namespace. We recommend that you use a copy of the standard function modules EHSWA_209_CHECK or EHSWA_209_CHECK_BGS to collect the data.

So that the BAdI saves the additional data determined to the database, it must return the indicator X_FLG_SOMETHING_CHANGED (Write Data to Database by BAdI) = X. Otherwise, the additional data is saved only if you changed other data in the disposal document first, which the system has to save independent of this BAdI.

Standard settings

The BAdI is active in the standard system and a default implementation is supplied. This only returns the X_FLG_SOMETHING_CHANGED indicator empty, that is the default implementation does not save any additional data.

The BAdI is not filter-dependent, but is intended 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.

Example

When you save the disposal document data, the system updates the waste quantity disposed of in the waste approval based on the waste quantity in the disposal document. If you also want the system to total the waste quantities for each year separately, you can set this up using this BAdI and store the quantities disposed of annually in your own database table.

See also:

Methods

Save Additional Data with Disposal Document Data

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 3   Nonrequired 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 EHSW_MN_SAVE_TO_DB 0 SH10000005 Disposal Documents 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20041018 
SAP Release Created in 600