Fonction SAP CBRC_CALC_AVERAGE - Average Value Calculation

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_AVG_CAT CCRCE_AVG_CAT C 2 IC_AVG_CAT-THREE_YAVG X Average Category
I_AVG_YEARS_TAB CCRCTT_SELOPT h 93 Relevant Years
I_DATA_TAB CCRCTT_CHK_RESULT h 504 Relevant Substance Quantities
I_REG ESESLSTID C 10 Regulatory List
I_YEAR CCRCE_YEAR N 4 Monitoring Year

Paramètre Reférence Type Long. Description
E_AVG_DATA_TAB CCRCTT_CALC h 117 Table with Calculated Averages
E_ERROR_TAB CCRCTT_MSG h 642 Message Table for Application Log
E_FLG_ERROR ESEBOOLE C 1 Error Indicator

Functionality
This function module calculates the average values of the transferredsubstance quantities (I_DATA_TAB). The calculated average value issummarized for the fields Regulation (Regulatory List),Company Code, and TrackedSubstance. An average value is calculated for a tracked substanceonly if the substance quantity is > 0 for all relevant years(I_AVG_YEARS_TAB).
The average value is calculated by first adding all of the substancequantities for the tracked substance and then dividing this total valueby the number of relevant years.

Example
Monitoring year (I_YEAR) = 2009
Relevant years (I_AVG_YEARS_TAB) = 2006, 2007, and 2008
Substance quantities for which an average value is calculated:
Year,,Substance Quantity
2006,,10 to
2007,,40 to
2008,,40 to => The calculated average value is 30 to
Substance quantities for which no value is calculated:
Year,,Substance Quantity
2006,,0 to
2007,,10 to
2008,,10 to
2006,,10 to
2007,,0 to
2008,,10 to
2006,, 10 to
2007,, 10 to
2008,, 0 to