SAP GLE_ADB_CALCULATE_KEY_FIGURES Function Module for
GLE_ADB_CALCULATE_KEY_FIGURES is a standard gle adb calculate key figures SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for gle adb calculate key figures FM, simply by entering the name GLE_ADB_CALCULATE_KEY_FIGURES into the relevant SAP transaction such as SE37 or SE38.
Function Group: GLE_ADB_KEY_FIGURES
Program Name: SAPLGLE_ADB_KEY_FIGURES
Main Program: SAPLGLE_ADB_KEY_FIGURES
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function GLE_ADB_CALCULATE_KEY_FIGURES pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'GLE_ADB_CALCULATE_KEY_FIGURES'".
EXPORTING
IV_LEDGER_GROUP = "Ledger Group
* IT_FIELDS_FOR_AGGREGATION = "
* IV_USE_ZERO_VALUES_FROM_DB = '' "
* IV_TIMESTAMP = "
* IV_WITH_DRCRK = "
* IV_WITH_ACC_DESC = "
* IV_IGNORE_EXT_AVG = "
* IV_REPORTING_DATE = "DATS Field Type
* IT_REPORTING_DATES = "
IS_CUR_SEL = "Indicators for currency types for which key figs are calc.
* IV_ACCT = "General Ledger Account Number for Average Daily Balance
* IV_BUKRS = "Company Code for Average Daily Balance
IS_KFC_SEL = "Selection of ADB Key Figures for Key Figure Calculation
* IT_DIM_SEL = "Field Ranges for Ledger Fields
* IT_KEYTAB_SEL = "
IMPORTING
ER_KFC = "Average Daily Balance: Key Figures and Currencies
ET_KFC = "Average Daily Balance: Key Figures and Currencies
EXCEPTIONS
NO_DATA_FOUND = 1 CANCEL_CALCULATION = 2 LEDGER_NOT_CUSTOMIZED = 3 SELECTION_ERROR = 4
IMPORTING Parameters details for GLE_ADB_CALCULATE_KEY_FIGURES
IV_LEDGER_GROUP - Ledger Group
Data type: GLE_DTE_LEDGER_ENVIRONMENTOptional: No
Call by Reference: No ( called with pass by value option)
IT_FIELDS_FOR_AGGREGATION -
Data type: GLE_TAB_ADB_FIELDNAMEOptional: Yes
Call by Reference: Yes
IV_USE_ZERO_VALUES_FROM_DB -
Data type: GLE_DTE_ADB_BOOLEANDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_TIMESTAMP -
Data type: TIMESTAMPOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_WITH_DRCRK -
Data type: GLE_DTE_ADB_BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_WITH_ACC_DESC -
Data type: GLE_DTE_ADB_BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_IGNORE_EXT_AVG -
Data type: GLE_DTE_ADB_BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_REPORTING_DATE - DATS Field Type
Data type: DATSOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_REPORTING_DATES -
Data type: GLE_TAB_ADB_DATSOptional: Yes
Call by Reference: Yes
IS_CUR_SEL - Indicators for currency types for which key figs are calc.
Data type: GLE_STR_ADB_CUROptional: No
Call by Reference: No ( called with pass by value option)
IV_ACCT - General Ledger Account Number for Average Daily Balance
Data type: GLE_DTE_ADB_SAKNROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_BUKRS - Company Code for Average Daily Balance
Data type: GLE_DTE_ADB_BUKRSOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_KFC_SEL - Selection of ADB Key Figures for Key Figure Calculation
Data type: GLE_STR_ADB_KEYFIGURESOptional: No
Call by Reference: No ( called with pass by value option)
IT_DIM_SEL - Field Ranges for Ledger Fields
Data type: GLE_TAB_ADB_FIELD_DIM_SELOptional: Yes
Call by Reference: Yes
IT_KEYTAB_SEL -
Data type: TABLEOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for GLE_ADB_CALCULATE_KEY_FIGURES
ER_KFC - Average Daily Balance: Key Figures and Currencies
Data type: DATAOptional: No
Call by Reference: Yes
ET_KFC - Average Daily Balance: Key Figures and Currencies
Data type: TABLEOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_DATA_FOUND - Cannot transfer data
Data type:Optional: No
Call by Reference: Yes
CANCEL_CALCULATION - Calculation was cancelled due to a (serious) error
Data type:Optional: No
Call by Reference: Yes
LEDGER_NOT_CUSTOMIZED -
Data type:Optional: No
Call by Reference: Yes
SELECTION_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for GLE_ADB_CALCULATE_KEY_FIGURES Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_er_kfc | TYPE DATA, " | |||
lv_no_data_found | TYPE DATA, " | |||
lv_iv_ledger_group | TYPE GLE_DTE_LEDGER_ENVIRONMENT, " | |||
lv_it_fields_for_aggregation | TYPE GLE_TAB_ADB_FIELDNAME, " | |||
lv_iv_use_zero_values_from_db | TYPE GLE_DTE_ADB_BOOLEAN, " '' | |||
lv_iv_timestamp | TYPE TIMESTAMP, " | |||
lv_iv_with_drcrk | TYPE GLE_DTE_ADB_BOOLEAN, " | |||
lv_iv_with_acc_desc | TYPE GLE_DTE_ADB_BOOLEAN, " | |||
lv_iv_ignore_ext_avg | TYPE GLE_DTE_ADB_BOOLEAN, " | |||
lv_et_kfc | TYPE TABLE, " | |||
lv_iv_reporting_date | TYPE DATS, " | |||
lv_cancel_calculation | TYPE DATS, " | |||
lv_it_reporting_dates | TYPE GLE_TAB_ADB_DATS, " | |||
lv_ledger_not_customized | TYPE GLE_TAB_ADB_DATS, " | |||
lv_is_cur_sel | TYPE GLE_STR_ADB_CUR, " | |||
lv_selection_error | TYPE GLE_STR_ADB_CUR, " | |||
lv_iv_acct | TYPE GLE_DTE_ADB_SAKNR, " | |||
lv_iv_bukrs | TYPE GLE_DTE_ADB_BUKRS, " | |||
lv_is_kfc_sel | TYPE GLE_STR_ADB_KEYFIGURES, " | |||
lv_it_dim_sel | TYPE GLE_TAB_ADB_FIELD_DIM_SEL, " | |||
lv_it_keytab_sel | TYPE TABLE. " |
  CALL FUNCTION 'GLE_ADB_CALCULATE_KEY_FIGURES' " |
EXPORTING | ||
IV_LEDGER_GROUP | = lv_iv_ledger_group | |
IT_FIELDS_FOR_AGGREGATION | = lv_it_fields_for_aggregation | |
IV_USE_ZERO_VALUES_FROM_DB | = lv_iv_use_zero_values_from_db | |
IV_TIMESTAMP | = lv_iv_timestamp | |
IV_WITH_DRCRK | = lv_iv_with_drcrk | |
IV_WITH_ACC_DESC | = lv_iv_with_acc_desc | |
IV_IGNORE_EXT_AVG | = lv_iv_ignore_ext_avg | |
IV_REPORTING_DATE | = lv_iv_reporting_date | |
IT_REPORTING_DATES | = lv_it_reporting_dates | |
IS_CUR_SEL | = lv_is_cur_sel | |
IV_ACCT | = lv_iv_acct | |
IV_BUKRS | = lv_iv_bukrs | |
IS_KFC_SEL | = lv_is_kfc_sel | |
IT_DIM_SEL | = lv_it_dim_sel | |
IT_KEYTAB_SEL | = lv_it_keytab_sel | |
IMPORTING | ||
ER_KFC | = lv_er_kfc | |
ET_KFC | = lv_et_kfc | |
EXCEPTIONS | ||
NO_DATA_FOUND = 1 | ||
CANCEL_CALCULATION = 2 | ||
LEDGER_NOT_CUSTOMIZED = 3 | ||
SELECTION_ERROR = 4 | ||
. " GLE_ADB_CALCULATE_KEY_FIGURES |
ABAP code using 7.40 inline data declarations to call FM GLE_ADB_CALCULATE_KEY_FIGURES
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.DATA(ld_iv_use_zero_values_from_db) | = ''. | |||
Search for further information about these or an SAP related objects