Show TOC

 Create Counters for Mass Runs

Use

You want to add your own counters in an interval, in addition to the standard counters, such as error count and number of hits.

Procedure

To add counters to the mass activities provided by SAP, proceed as follows:

  1. In Customizing for Contract Accounts Receivable and Payable, choose Start of the navigation path Technical Settings Next navigation step Prepare Mass Activities End of the navigation path and select the mass activity, for which you want to make settings. If you do not want the standard counters to be displayed in logs, you can suppress these counters. To do so, choose General Control in the tree structure and then the Other tab. If the Display Standard Counter indicator in the Standard Counter group box is not set, then the standard counters are not displayed.

  2. Choose Counter Definition in the tree structure.

  3. Enter the counter number in the Counter field. The number corresponds to the COUNTID field that is in the structure FKK_MASS_ACT_COUNT implemented in the interval module.

  4. Enter a description for the counter in the CounterTyp field. The description is needed for displaying the counter in the application log.

  5. Enter a data element in the Element field. The field labels of the data element are needed when the counter is displayed in the job log.

  6. In the Application Log field, specify if the counter is listed in the application log.

  7. In the Job Log field, specify if the counter is displayed when the job logs are displayed.

To implement counters for your own custom mass activities, use the interval module defined for the mass activity. To do so, define a table T_COUNTER with structure FKK_MASS_ACT_COUNT in the interface of the interval module. The structure FKK_MASS_ACT_COUNT consists of two elements that are filled in table T_COUNTER. COUNTID contains the counter number, and VALUE contains the value of the counter. A sample implementation in the interval module has the following form:

DATA: wa_t_counter LIKE LINE OF t_counter.

wa_t_counter-countid = <Zählernummer>.

wa_t_counter-value = <Wert des Zählers>.

APPEND wa_t_counter TO t_counter.