You want to add your own counters in an interval, in addition to the standard counters, such as error count and number of hits.
To add counters to the mass activities provided by SAP, proceed as follows:
In Customizing for Contract Accounts Receivable and Payable, 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.
Choose Counter Definition
in the tree structure.
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.
Enter a description for the counter in the CounterTyp
field. The description is needed for displaying the counter in the application log.
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.
In the Application Log
field, specify if the counter is listed in the application log.
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.