Ansicht
Dokumentation

EHENV_CDEF_AUTO_CALC - Schedule Jobs for Automatic Calculations

EHENV_CDEF_AUTO_CALC - Schedule Jobs for Automatic Calculations

ABAP Short Reference   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

In this Customizing activity, you can schedule a background job that automatically starts a calculation on environmental data recorded in the system. Depending on the collection nature, the environmental data that is recorded in the system may vary by type. Data can be recorded in the system in the following ways:

  • Manually by scheduling manual data collection activities performed by environmental technicians
  • Automatically by scheduling automatic imports of data from, files performed in the background by machine-to-machine processes.

The background job controls the running of the report R_EHENV_CDEF_AUTO_CALC_JOB. This program carries out a check on the system and identifies all approved values that are ready for automatic calculation. The program examines the approved data entries, determines whether it complies with the conditions required to run, and triggers the calculations. This program is scheduled to run at defined time intervals, or on specific event like value changes.

Before you proceed with the scheduling of the background job for calculations, make sure that the following prerequisites are met:

  • Your user for background processing is authorized to access information about the data collections in the system.
  • Create a productive variant of the report (and configure the corresponding input parameters).
  • Use the standard SAP user for the workflow system SAP_WFRT.

The recommended setup is to configure a periodical activation of the program for manually recorded and automatically imported data, both on the event SAP_EHFND_AMOUNT_CNG using the system client number as a parameter. To do this, you can create a variant containing the following settings:

  • Job activation period 59 minutes
  • No test mode
  • No tracing
  • No continuous activation
  • All types of calculation operations

Additionally, the program enables you to carry out automatic calculations depending on the nature of the input data. To improve the system performance, you can schedule separate processing of automatic calculation operations either based on manually recorded data or automatically imported data. To do this, you need to create separate variants of the program and specify for processing the corresponding calculation operations.

Note

When you create separate variants for calculation of only manually recorded or automatically imported data and then you schedule jobs for both variants, the event SAP_EHFND_AMOUNT_CNG activates both jobs simultaneously. In this case, if any of the carried out calculations causes an occurrence of the event (for example, the calculations produce input data for other calculations) the event will activate both jobs again. This means that if your business case potentially features nested calculations, the system will activate the scheduled jobs exponentially. In this case, one of the activated jobs will not process any data, because it is started solely by schedule which was set up to run the job after the configured event.

Use the job wizard to specify the general data and schedule the job.

  1. Start the Job Wizard and specify a unique job name.
  2. Specify an ABAP program step in the job. Define the job for the program R_EHENV_CDEF_AUTO_CALC_JOB and specify the variant that you created for your business case.
  3. Specify the job start condition to be after the event SAP_EHFND_AMOUNT_CNG.

You can use an alternative setup for the job without specifying a triggering event but a continuous execution instead. To do this you can create a variant of the program containing the following settings:

  • Job activation period 59 minutes
  • No test mode
  • No tracing
  • With continuous activation
  • Process all calculation operations

This setup makes the job run continuously for up to 59 minutes. Within this interval, the job triggers all pending calculations in the system that were not triggered yet (for example, after a given event, or by another job). This alternative setup enables you to ensure that there are no skipped calculations at the end of certain periods (end of month, or end of year).

Note

To avoid overlap, the activation period should be shorter than the job execution period. Since a parallel activation of the same job is prevented, if in specific high-volume cases a parallel activation of the same job is needed, a different job must be scheduled.






ROGBILLS - Synchronize billing plans   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 5425 Date: 20240523 Time: 153728     sap01-206 ( 108 ms )