SAP GM_GET_BUDGET_DOCUMENT_SINGLE Function Module for Get to budget document









GM_GET_BUDGET_DOCUMENT_SINGLE is a standard gm get budget document single 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 to budget document 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 document single FM, simply by entering the name GM_GET_BUDGET_DOCUMENT_SINGLE 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_DOCUMENT_SINGLE 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_DOCUMENT_SINGLE'"Get to budget document
EXPORTING
I_BDGT_DOC_NBR = "Budget document number
* I_AUTH_ACTIVITY = "Activity
* I_AUTH_ACTIVITY_GRANT = "Grant Activity

IMPORTING
E_F_GMBDGTHEADER = "Budget document header
E_F_GMHBDGTHEADER = "First Budget hold document header
E_DOCSTATUS = "Hold/Park/Post

TABLES
* E_T_GMHBDGTHEADER = "Budget hold document header
* E_T_GMBDGTLINE = "Budget document line
* E_T_GMHBDGTLINE = "Budget hold document line
* E_T_GMBDGTFYDLINE = "Budget Fiscal Year Distr Lines
* E_T_GMHBDGTFYDLINE = "Budget Fiscal Year Distr Lines for hold

EXCEPTIONS
NOT_FOUND = 1 NOT_AUTHORIZED = 2
.



IMPORTING Parameters details for GM_GET_BUDGET_DOCUMENT_SINGLE

I_BDGT_DOC_NBR - Budget document number

Data type: GMBDGTHEADER-BDGT_DOC_NBR
Optional: No
Call by Reference: No ( called with pass by value option)

I_AUTH_ACTIVITY - Activity

Data type: ACTIV_AUTH
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AUTH_ACTIVITY_GRANT - Grant Activity

Data type: ACTIV_AUTH
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GM_GET_BUDGET_DOCUMENT_SINGLE

E_F_GMBDGTHEADER - Budget document header

Data type: GMBDGTHEADER
Optional: No
Call by Reference: Yes

E_F_GMHBDGTHEADER - First Budget hold document header

Data type: GMHBDGTHEADER
Optional: No
Call by Reference: Yes

E_DOCSTATUS - Hold/Park/Post

Data type: FLAG
Optional: No
Call by Reference: Yes

TABLES Parameters details for GM_GET_BUDGET_DOCUMENT_SINGLE

E_T_GMHBDGTHEADER - Budget hold document header

Data type: GMHBDGTHEADER
Optional: Yes
Call by Reference: Yes

E_T_GMBDGTLINE - Budget document line

Data type: GMBDGTLINE
Optional: Yes
Call by Reference: Yes

E_T_GMHBDGTLINE - Budget hold document line

Data type: GMHBDGTLINE
Optional: Yes
Call by Reference: Yes

E_T_GMBDGTFYDLINE - Budget Fiscal Year Distr Lines

Data type: GMBDGTFYDLINE
Optional: Yes
Call by Reference: Yes

E_T_GMHBDGTFYDLINE - Budget Fiscal Year Distr Lines for hold

Data type: GMHBDGTFYDLINE
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NOT_FOUND - Nothing found

Data type:
Optional: No
Call by Reference: Yes

NOT_AUTHORIZED - Not authorized for this budget document

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GM_GET_BUDGET_DOCUMENT_SINGLE 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, "   
lv_i_bdgt_doc_nbr  TYPE GMBDGTHEADER-BDGT_DOC_NBR, "   
lv_e_f_gmbdgtheader  TYPE GMBDGTHEADER, "   
lt_e_t_gmhbdgtheader  TYPE STANDARD TABLE OF GMHBDGTHEADER, "   
lt_e_t_gmbdgtline  TYPE STANDARD TABLE OF GMBDGTLINE, "   
lv_not_authorized  TYPE GMBDGTLINE, "   
lv_i_auth_activity  TYPE ACTIV_AUTH, "   
lv_e_f_gmhbdgtheader  TYPE GMHBDGTHEADER, "   
lv_e_docstatus  TYPE FLAG, "   
lt_e_t_gmhbdgtline  TYPE STANDARD TABLE OF GMHBDGTLINE, "   
lv_i_auth_activity_grant  TYPE ACTIV_AUTH, "   
lt_e_t_gmbdgtfydline  TYPE STANDARD TABLE OF GMBDGTFYDLINE, "   
lt_e_t_gmhbdgtfydline  TYPE STANDARD TABLE OF GMHBDGTFYDLINE. "   

  CALL FUNCTION 'GM_GET_BUDGET_DOCUMENT_SINGLE'  "Get to budget document
    EXPORTING
         I_BDGT_DOC_NBR = lv_i_bdgt_doc_nbr
         I_AUTH_ACTIVITY = lv_i_auth_activity
         I_AUTH_ACTIVITY_GRANT = lv_i_auth_activity_grant
    IMPORTING
         E_F_GMBDGTHEADER = lv_e_f_gmbdgtheader
         E_F_GMHBDGTHEADER = lv_e_f_gmhbdgtheader
         E_DOCSTATUS = lv_e_docstatus
    TABLES
         E_T_GMHBDGTHEADER = lt_e_t_gmhbdgtheader
         E_T_GMBDGTLINE = lt_e_t_gmbdgtline
         E_T_GMHBDGTLINE = lt_e_t_gmhbdgtline
         E_T_GMBDGTFYDLINE = lt_e_t_gmbdgtfydline
         E_T_GMHBDGTFYDLINE = lt_e_t_gmhbdgtfydline
    EXCEPTIONS
        NOT_FOUND = 1
        NOT_AUTHORIZED = 2
. " GM_GET_BUDGET_DOCUMENT_SINGLE




ABAP code using 7.40 inline data declarations to call FM GM_GET_BUDGET_DOCUMENT_SINGLE

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 BDGT_DOC_NBR FROM GMBDGTHEADER INTO @DATA(ld_i_bdgt_doc_nbr).
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!