SAP FMBD_READ_TOTALS_WITH_RANGES Function Module for Data selection from summary table FMDBT
FMBD_READ_TOTALS_WITH_RANGES is a standard fmbd read totals with ranges SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Data selection from summary table FMDBT processing and below is the pattern details for this FM, 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 fmbd read totals with ranges FM, simply by entering the name FMBD_READ_TOTALS_WITH_RANGES into the relevant SAP transaction such as SE37 or SE38.
Function Group: FMBD_DATABASE_ACCESS
Program Name: SAPLFMBD_DATABASE_ACCESS
Main Program: SAPLFMBD_DATABASE_ACCESS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FMBD_READ_TOTALS_WITH_RANGES 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 'FMBD_READ_TOTALS_WITH_RANGES'"Data selection from summary table FMDBT.
EXPORTING
I_FMAREA = "Financial management area
* I_FLG_CONSIDER_UPDATE_BUFFER = ' ' "Consider values in update buffer? Yes/No
* I_FLG_INCL_ZERO_RECORDS = ' ' "'X' = Also include zero records
IMPORTING
E_T_FMBDT = "Totals table FMBDT
TABLES
* I_T_FISCYEAR = "Range table for Fiscal year
* I_T_USERDIM = "Range Table for User dimension
* I_T_CEFFYEAR = "Range table for Year of cash effectivity
* I_T_WFSTATE = "Range table for Workflow State
* I_T_PROCESS = "Range table for Process
* I_T_BUDTYPE = "Range table for Budget type
* I_T_BUDCAT = "Range Table for Budget Category
* I_T_VALTYPE = "Range Table for Value type
* I_T_VERSION = "Range Table for Version
* I_T_FUND = "Range Table for Fund
* I_T_BUDGET_PD = "Range Table for Budget Period
* I_T_FDSCTR = "Range Table for Funds center
* I_T_CMMTITEM = "Range Table for Commitment item
* I_T_FUNCAREA = "Range table for Functional area
* I_T_MEASURE = "Range table for Measure
* I_T_GRANT_NBR = "Range table for grant
EXCEPTIONS
SELECTION_ERROR = 1
IMPORTING Parameters details for FMBD_READ_TOTALS_WITH_RANGES
I_FMAREA - Financial management area
Data type: FIKRSOptional: No
Call by Reference: Yes
I_FLG_CONSIDER_UPDATE_BUFFER - Consider values in update buffer? Yes/No
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_FLG_INCL_ZERO_RECORDS - 'X' = Also include zero records
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FMBD_READ_TOTALS_WITH_RANGES
E_T_FMBDT - Totals table FMBDT
Data type: FMBD_T_TOptional: No
Call by Reference: Yes
TABLES Parameters details for FMBD_READ_TOTALS_WITH_RANGES
I_T_FISCYEAR - Range table for Fiscal year
Data type: RANGE_S_YEAROptional: Yes
Call by Reference: Yes
I_T_USERDIM - Range Table for User dimension
Data type: RANGE_C10Optional: Yes
Call by Reference: Yes
I_T_CEFFYEAR - Range table for Year of cash effectivity
Data type: RANGE_S_YEAROptional: Yes
Call by Reference: Yes
I_T_WFSTATE - Range table for Workflow State
Data type: RANGE_C1Optional: Yes
Call by Reference: Yes
I_T_PROCESS - Range table for Process
Data type: RANGE_C4Optional: Yes
Call by Reference: Yes
I_T_BUDTYPE - Range table for Budget type
Data type: RANGE_C4Optional: Yes
Call by Reference: Yes
I_T_BUDCAT - Range Table for Budget Category
Data type: RANGE_C2Optional: Yes
Call by Reference: Yes
I_T_VALTYPE - Range Table for Value type
Data type: RANGE_C2Optional: Yes
Call by Reference: Yes
I_T_VERSION - Range Table for Version
Data type: RANGE_C3Optional: Yes
Call by Reference: Yes
I_T_FUND - Range Table for Fund
Data type: RANGE_C10Optional: Yes
Call by Reference: Yes
I_T_BUDGET_PD - Range Table for Budget Period
Data type: RANGE_C10Optional: Yes
Call by Reference: Yes
I_T_FDSCTR - Range Table for Funds center
Data type: RANGE_C16Optional: Yes
Call by Reference: Yes
I_T_CMMTITEM - Range Table for Commitment item
Data type: RANGE_C24Optional: Yes
Call by Reference: Yes
I_T_FUNCAREA - Range table for Functional area
Data type: RANGE_C16Optional: Yes
Call by Reference: Yes
I_T_MEASURE - Range table for Measure
Data type: RANGE_C24Optional: Yes
Call by Reference: Yes
I_T_GRANT_NBR - Range table for grant
Data type: RANGE_C20Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
SELECTION_ERROR - Error during FISL selection
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FMBD_READ_TOTALS_WITH_RANGES 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_i_fmarea | TYPE FIKRS, " | |||
| lv_e_t_fmbdt | TYPE FMBD_T_T, " | |||
| lt_i_t_fiscyear | TYPE STANDARD TABLE OF RANGE_S_YEAR, " | |||
| lv_selection_error | TYPE RANGE_S_YEAR, " | |||
| lt_i_t_userdim | TYPE STANDARD TABLE OF RANGE_C10, " | |||
| lt_i_t_ceffyear | TYPE STANDARD TABLE OF RANGE_S_YEAR, " | |||
| lt_i_t_wfstate | TYPE STANDARD TABLE OF RANGE_C1, " | |||
| lt_i_t_process | TYPE STANDARD TABLE OF RANGE_C4, " | |||
| lt_i_t_budtype | TYPE STANDARD TABLE OF RANGE_C4, " | |||
| lt_i_t_budcat | TYPE STANDARD TABLE OF RANGE_C2, " | |||
| lt_i_t_valtype | TYPE STANDARD TABLE OF RANGE_C2, " | |||
| lt_i_t_version | TYPE STANDARD TABLE OF RANGE_C3, " | |||
| lv_i_flg_consider_update_buffer | TYPE XFELD, " SPACE | |||
| lt_i_t_fund | TYPE STANDARD TABLE OF RANGE_C10, " | |||
| lv_i_flg_incl_zero_records | TYPE XFELD, " SPACE | |||
| lt_i_t_budget_pd | TYPE STANDARD TABLE OF RANGE_C10, " | |||
| lt_i_t_fdsctr | TYPE STANDARD TABLE OF RANGE_C16, " | |||
| lt_i_t_cmmtitem | TYPE STANDARD TABLE OF RANGE_C24, " | |||
| lt_i_t_funcarea | TYPE STANDARD TABLE OF RANGE_C16, " | |||
| lt_i_t_measure | TYPE STANDARD TABLE OF RANGE_C24, " | |||
| lt_i_t_grant_nbr | TYPE STANDARD TABLE OF RANGE_C20. " |
|   CALL FUNCTION 'FMBD_READ_TOTALS_WITH_RANGES' "Data selection from summary table FMDBT |
| EXPORTING | ||
| I_FMAREA | = lv_i_fmarea | |
| I_FLG_CONSIDER_UPDATE_BUFFER | = lv_i_flg_consider_update_buffer | |
| I_FLG_INCL_ZERO_RECORDS | = lv_i_flg_incl_zero_records | |
| IMPORTING | ||
| E_T_FMBDT | = lv_e_t_fmbdt | |
| TABLES | ||
| I_T_FISCYEAR | = lt_i_t_fiscyear | |
| I_T_USERDIM | = lt_i_t_userdim | |
| I_T_CEFFYEAR | = lt_i_t_ceffyear | |
| I_T_WFSTATE | = lt_i_t_wfstate | |
| I_T_PROCESS | = lt_i_t_process | |
| I_T_BUDTYPE | = lt_i_t_budtype | |
| I_T_BUDCAT | = lt_i_t_budcat | |
| I_T_VALTYPE | = lt_i_t_valtype | |
| I_T_VERSION | = lt_i_t_version | |
| I_T_FUND | = lt_i_t_fund | |
| I_T_BUDGET_PD | = lt_i_t_budget_pd | |
| I_T_FDSCTR | = lt_i_t_fdsctr | |
| I_T_CMMTITEM | = lt_i_t_cmmtitem | |
| I_T_FUNCAREA | = lt_i_t_funcarea | |
| I_T_MEASURE | = lt_i_t_measure | |
| I_T_GRANT_NBR | = lt_i_t_grant_nbr | |
| EXCEPTIONS | ||
| SELECTION_ERROR = 1 | ||
| . " FMBD_READ_TOTALS_WITH_RANGES | ||
ABAP code using 7.40 inline data declarations to call FM FMBD_READ_TOTALS_WITH_RANGES
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_i_flg_consider_update_buffer) | = ' '. | |||
| DATA(ld_i_flg_incl_zero_records) | = ' '. | |||
Search for further information about these or an SAP related objects