Ansicht
Dokumentation

EHSW_MN_SAVE_TO_DB - BAdI: Save Additional Disposal Document Data

EHSW_MN_SAVE_TO_DB - BAdI: Save Additional Disposal Document Data

Fill RESBD Structure from EBP Component Structure   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

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.

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.

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.

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.

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.

Methods

Save Additional Data with Disposal Document Data






ROGBILLS - Synchronize billing plans   General Material Data  
This documentation is copyright by SAP AG.

Length: 3909 Date: 20240523 Time: 170415     sap01-206 ( 68 ms )