SAP GM_GET_BUDGET_OBJECTS Function Module for Get Allowed Budget Objects
GM_GET_BUDGET_OBJECTS is a standard gm get budget objects 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 Allowed Budget Objects 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 objects FM, simply by entering the name GM_GET_BUDGET_OBJECTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: GMGRBD
Program Name: SAPLGMGRBD
Main Program: SAPLGMGRBD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GM_GET_BUDGET_OBJECTS 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_OBJECTS'"Get Allowed Budget Objects.
EXPORTING
P_GRANT_NBR = "Grant
P_PLAN = "Planning allowed indicator
P_REFRESH = "Refresh Values
TABLES
* T_PROGRAMS = "
* T_CLASSES = "
* T_FINANCING_OBJECTS = "
* T_COMBINATIONS = "Grant sponsored objects
EXCEPTIONS
NO_PROGRAMS_FOUND = 1 NO_CLASSES_FOUND = 2 NO_FIN_OBJ_FOUND = 3 NO_COMBINATIONS_FOUND = 4
IMPORTING Parameters details for GM_GET_BUDGET_OBJECTS
P_GRANT_NBR - Grant
Data type: GMGR-GRANT_NBROptional: No
Call by Reference: No ( called with pass by value option)
P_PLAN - Planning allowed indicator
Data type: GMGRSPONSOREDOBJ-PLAN_ALLOWEDOptional: No
Call by Reference: No ( called with pass by value option)
P_REFRESH - Refresh Values
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GM_GET_BUDGET_OBJECTS
T_PROGRAMS -
Data type: GMBU_T_PROGRAMSOptional: Yes
Call by Reference: Yes
T_CLASSES -
Data type: GMBU_T_CLASSESOptional: Yes
Call by Reference: Yes
T_FINANCING_OBJECTS -
Data type: GMBU_T_F_OBJECTSOptional: Yes
Call by Reference: Yes
T_COMBINATIONS - Grant sponsored objects
Data type: GMGRSPONSOREDOBJOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_PROGRAMS_FOUND - No Programs have been found
Data type:Optional: No
Call by Reference: Yes
NO_CLASSES_FOUND - No Classes have been found
Data type:Optional: No
Call by Reference: Yes
NO_FIN_OBJ_FOUND - No Financial Objects have been found
Data type:Optional: No
Call by Reference: Yes
NO_COMBINATIONS_FOUND - No combinations have been found
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for GM_GET_BUDGET_OBJECTS 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: | ||||
| lt_t_programs | TYPE STANDARD TABLE OF GMBU_T_PROGRAMS, " | |||
| lv_p_grant_nbr | TYPE GMGR-GRANT_NBR, " | |||
| lv_no_programs_found | TYPE GMGR, " | |||
| lv_p_plan | TYPE GMGRSPONSOREDOBJ-PLAN_ALLOWED, " | |||
| lt_t_classes | TYPE STANDARD TABLE OF GMBU_T_CLASSES, " | |||
| lv_no_classes_found | TYPE GMBU_T_CLASSES, " | |||
| lv_p_refresh | TYPE XFELD, " | |||
| lv_no_fin_obj_found | TYPE XFELD, " | |||
| lt_t_financing_objects | TYPE STANDARD TABLE OF GMBU_T_F_OBJECTS, " | |||
| lt_t_combinations | TYPE STANDARD TABLE OF GMGRSPONSOREDOBJ, " | |||
| lv_no_combinations_found | TYPE GMGRSPONSOREDOBJ. " |
|   CALL FUNCTION 'GM_GET_BUDGET_OBJECTS' "Get Allowed Budget Objects |
| EXPORTING | ||
| P_GRANT_NBR | = lv_p_grant_nbr | |
| P_PLAN | = lv_p_plan | |
| P_REFRESH | = lv_p_refresh | |
| TABLES | ||
| T_PROGRAMS | = lt_t_programs | |
| T_CLASSES | = lt_t_classes | |
| T_FINANCING_OBJECTS | = lt_t_financing_objects | |
| T_COMBINATIONS | = lt_t_combinations | |
| EXCEPTIONS | ||
| NO_PROGRAMS_FOUND = 1 | ||
| NO_CLASSES_FOUND = 2 | ||
| NO_FIN_OBJ_FOUND = 3 | ||
| NO_COMBINATIONS_FOUND = 4 | ||
| . " GM_GET_BUDGET_OBJECTS | ||
ABAP code using 7.40 inline data declarations to call FM GM_GET_BUDGET_OBJECTS
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 GRANT_NBR FROM GMGR INTO @DATA(ld_p_grant_nbr). | ||||
| "SELECT single PLAN_ALLOWED FROM GMGRSPONSOREDOBJ INTO @DATA(ld_p_plan). | ||||
Search for further information about these or an SAP related objects