Ansicht
Dokumentation

EHENV_CHCK_CALC_BADI - BAdI: Check Environmental Data and Prepare Calculations

EHENV_CHCK_CALC_BADI - BAdI: Check Environmental Data and Prepare Calculations

Addresses (Business Address Services)   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in Environment Management( EHS-SUS-EM) to enhance the standard functionality for checking the validity of the environmental data and prepare this data for subsequent processes, such as calculations and aggregations.

There are two possible modes of calling the BAdI implementation: synchronous (sequential) and asynchronous (parallel).

The default system is delivered with activated implementation of asynchronous data checks. When the data is checked asynchronously, part of the process that prepares the environmental data for calculation runs in the background, parallel to any other processing or visualization of the data. This unlocks the application and enables the user to work with it, without having to wait for the BAdI implementation to finish its work.

Some examples when this BAdI is called:

  • When importing environmental data from a spreadsheet
  • Before performing automatic calculations
  • After modifying (entering, replacing) values of environmental data records, such as for example a measured value in a data collection

Caution

Asynchronous implementation: Since the process is performed in the background, if an error occurs, it can prevent any follow-up calculations, aggregations, or processes dependent on the validity of the environmental data (being checked via the BAdI implementation), and the user cannot identify the error.

Synchronous implementation: Alternatively, the synchronous BAdI implementation performs the entire process of data checks and preparation for calculation in the system foreground (and requires that the process is finished before proceeding with additional follow-up processing). This locks the application for user interaction and reduces the perceived system performance (the user is expected to wait for the BAdI implementation to finish its work, before being able to continue working with the application). However, the synchronous data checks make sure that the entire process of data check and preparation for calculation is finished correctly. It also enables the user to identify any potential errors in the process immediately.

The BAdI is intended for multiple uses and is not filter-dependent. This BAdI is active in the standard system and uses the following method:

  • CHECK_AND_REACT
The method contains a default implementation. It allows you to implement your own business logic that handles the check of environmental data and prepares that data for calculation. The method includes the following import and change parameters:
Import Parameters
  • AMOUNT_KEYS - Table with amount root keys

  • PARAMETERS- Table type for value sets including text

Change Parameters
  • MESSAGES - List of system messages in T100 format

  • FAILED_KEYS - Failed amount root keys

This BAdI definition uses the IF_EHFND_AMOUNTS_CHECK interface and has the following implementations:

  • BADI_EHENV_AMOUNTS_CHECK
This implementation performs an asynchronous check of the environmental data.
  • BADI_EHENV_SYNCH_AMOUNTS_CHECK
This implementation performs a synchronous check of the environmental data.





rdisp/max_wprun_time - Maximum work process run time   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 4548 Date: 20240523 Time: 155143     sap01-206 ( 71 ms )