SAP GM_GET_BUDGET_KEY_FIGURES Function Module for Get budget key figures
GM_GET_BUDGET_KEY_FIGURES is a standard gm get budget 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 for Get budget key figures 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 gm get budget key figures FM, simply by entering the name GM_GET_BUDGET_KEY_FIGURES into the relevant SAP transaction such as SE37 or SE38.
Function Group: GMREPPOOL
Program Name: SAPLGMREPPOOL
Main Program: SAPLGMREPPOOL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function GM_GET_BUDGET_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 'GM_GET_BUDGET_KEY_FIGURES'"Get budget key figures.
EXPORTING
* I_SEL_TWHERE = "Support of dynamic selection lookup
* I_FY_TOTALS_FROM = "Begin select totals from GMIT
* I_FY_TOTALS_TO = "End select totals from GMIT
* I_FY_DETAIL_FROM = "Begin select details in GMIP
* I_FY_DETAIL_TO = "End select details in GMIP
TABLES
* I_R_VERSION = "Version
* I_R_STATS_IND = "Statistical Indicator
* I_R_BDGT_STATE = "Workflow State of a Record in the Budget Totals Table
* I_R_BUDAT = "Posting Date in the Document
* I_R_DOCTY = "FI-SL document type
* I_R_REFDOCNR = "Reference Document Number
* E_T_GMIP = "Plan line items table
* E_T_GMIT = "Budget Summary table
* I_R_BUKRS = "Company Code
* I_R_GRANT_NBR = "Grant
* I_R_SPONSORED_PROG = "Sponsored Program
* I_R_SPONSORED_CLASS = "Sponsored Class
* I_R_BDGT_VLDTY_NBR = "Budget validity number
* I_R_FUND = "Fund
* I_R_VALUETYPE = "Value Type
* I_R_TRANS = "Business Transaction
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for GM_GET_BUDGET_KEY_FIGURES
I_SEL_TWHERE - Support of dynamic selection lookup
Data type: RSDS_TWHEREOptional: Yes
Call by Reference: Yes
I_FY_TOTALS_FROM - Begin select totals from GMIT
Data type: GMIT-RYEAROptional: Yes
Call by Reference: Yes
I_FY_TOTALS_TO - End select totals from GMIT
Data type: GMIT-RYEAROptional: Yes
Call by Reference: Yes
I_FY_DETAIL_FROM - Begin select details in GMIP
Data type: GMIP-RYEAROptional: Yes
Call by Reference: Yes
I_FY_DETAIL_TO - End select details in GMIP
Data type: GMIP-RYEAROptional: Yes
Call by Reference: Yes
TABLES Parameters details for GM_GET_BUDGET_KEY_FIGURES
I_R_VERSION - Version
Data type:Optional: Yes
Call by Reference: Yes
I_R_STATS_IND - Statistical Indicator
Data type:Optional: Yes
Call by Reference: Yes
I_R_BDGT_STATE - Workflow State of a Record in the Budget Totals Table
Data type:Optional: Yes
Call by Reference: Yes
I_R_BUDAT - Posting Date in the Document
Data type:Optional: Yes
Call by Reference: Yes
I_R_DOCTY - FI-SL document type
Data type:Optional: Yes
Call by Reference: Yes
I_R_REFDOCNR - Reference Document Number
Data type:Optional: Yes
Call by Reference: Yes
E_T_GMIP - Plan line items table
Data type: GMIPOptional: Yes
Call by Reference: Yes
E_T_GMIT - Budget Summary table
Data type: GMITOptional: Yes
Call by Reference: Yes
I_R_BUKRS - Company Code
Data type:Optional: Yes
Call by Reference: Yes
I_R_GRANT_NBR - Grant
Data type:Optional: Yes
Call by Reference: Yes
I_R_SPONSORED_PROG - Sponsored Program
Data type:Optional: Yes
Call by Reference: Yes
I_R_SPONSORED_CLASS - Sponsored Class
Data type:Optional: Yes
Call by Reference: Yes
I_R_BDGT_VLDTY_NBR - Budget validity number
Data type:Optional: Yes
Call by Reference: Yes
I_R_FUND - Fund
Data type:Optional: Yes
Call by Reference: Yes
I_R_VALUETYPE - Value Type
Data type:Optional: Yes
Call by Reference: Yes
I_R_TRANS - Business Transaction
Data type:Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for GM_GET_BUDGET_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_not_found | TYPE STRING, " | |||
lt_i_r_version | TYPE STANDARD TABLE OF STRING, " | |||
lv_i_sel_twhere | TYPE RSDS_TWHERE, " | |||
lt_i_r_stats_ind | TYPE STANDARD TABLE OF RSDS_TWHERE, " | |||
lt_i_r_bdgt_state | TYPE STANDARD TABLE OF RSDS_TWHERE, " | |||
lt_i_r_budat | TYPE STANDARD TABLE OF RSDS_TWHERE, " | |||
lt_i_r_docty | TYPE STANDARD TABLE OF RSDS_TWHERE, " | |||
lt_i_r_refdocnr | TYPE STANDARD TABLE OF RSDS_TWHERE, " | |||
lt_e_t_gmip | TYPE STANDARD TABLE OF GMIP, " | |||
lt_e_t_gmit | TYPE STANDARD TABLE OF GMIT, " | |||
lt_i_r_bukrs | TYPE STANDARD TABLE OF GMIT, " | |||
lv_i_fy_totals_from | TYPE GMIT-RYEAR, " | |||
lt_i_r_grant_nbr | TYPE STANDARD TABLE OF GMIT, " | |||
lv_i_fy_totals_to | TYPE GMIT-RYEAR, " | |||
lv_i_fy_detail_from | TYPE GMIP-RYEAR, " | |||
lt_i_r_sponsored_prog | TYPE STANDARD TABLE OF GMIP, " | |||
lv_i_fy_detail_to | TYPE GMIP-RYEAR, " | |||
lt_i_r_sponsored_class | TYPE STANDARD TABLE OF GMIP, " | |||
lt_i_r_bdgt_vldty_nbr | TYPE STANDARD TABLE OF GMIP, " | |||
lt_i_r_fund | TYPE STANDARD TABLE OF GMIP, " | |||
lt_i_r_valuetype | TYPE STANDARD TABLE OF GMIP, " | |||
lt_i_r_trans | TYPE STANDARD TABLE OF GMIP. " |
  CALL FUNCTION 'GM_GET_BUDGET_KEY_FIGURES' "Get budget key figures |
EXPORTING | ||
I_SEL_TWHERE | = lv_i_sel_twhere | |
I_FY_TOTALS_FROM | = lv_i_fy_totals_from | |
I_FY_TOTALS_TO | = lv_i_fy_totals_to | |
I_FY_DETAIL_FROM | = lv_i_fy_detail_from | |
I_FY_DETAIL_TO | = lv_i_fy_detail_to | |
TABLES | ||
I_R_VERSION | = lt_i_r_version | |
I_R_STATS_IND | = lt_i_r_stats_ind | |
I_R_BDGT_STATE | = lt_i_r_bdgt_state | |
I_R_BUDAT | = lt_i_r_budat | |
I_R_DOCTY | = lt_i_r_docty | |
I_R_REFDOCNR | = lt_i_r_refdocnr | |
E_T_GMIP | = lt_e_t_gmip | |
E_T_GMIT | = lt_e_t_gmit | |
I_R_BUKRS | = lt_i_r_bukrs | |
I_R_GRANT_NBR | = lt_i_r_grant_nbr | |
I_R_SPONSORED_PROG | = lt_i_r_sponsored_prog | |
I_R_SPONSORED_CLASS | = lt_i_r_sponsored_class | |
I_R_BDGT_VLDTY_NBR | = lt_i_r_bdgt_vldty_nbr | |
I_R_FUND | = lt_i_r_fund | |
I_R_VALUETYPE | = lt_i_r_valuetype | |
I_R_TRANS | = lt_i_r_trans | |
EXCEPTIONS | ||
NOT_FOUND = 1 | ||
. " GM_GET_BUDGET_KEY_FIGURES |
ABAP code using 7.40 inline data declarations to call FM GM_GET_BUDGET_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."SELECT single RYEAR FROM GMIT INTO @DATA(ld_i_fy_totals_from). | ||||
"SELECT single RYEAR FROM GMIT INTO @DATA(ld_i_fy_totals_to). | ||||
"SELECT single RYEAR FROM GMIP INTO @DATA(ld_i_fy_detail_from). | ||||
"SELECT single RYEAR FROM GMIP INTO @DATA(ld_i_fy_detail_to). | ||||
Search for further information about these or an SAP related objects