SAP FM_FG_FUND_STATUS Function Module for Return the US Fed. Gov. fund status (unexp, expired, canc)









FM_FG_FUND_STATUS is a standard fm fg fund status SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Return the US Fed. Gov. fund status (unexp, expired, canc) 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 fm fg fund status FM, simply by entering the name FM_FG_FUND_STATUS into the relevant SAP transaction such as SE37 or SE38.

Function Group: FMBL_FGBT_E
Program Name: SAPLFMBL_FGBT_E
Main Program: SAPLFMBL_FGBT_E
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function FM_FG_FUND_STATUS 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 'FM_FG_FUND_STATUS'"Return the US Fed. Gov. fund status (unexp, expired, canc)
EXPORTING
I_FM_AREA = "FM area
I_FUND = "
* I_FUND_DATE = "
* I_FISCAL_YEAR = "Fiscal year
* I_FLG_EXCEPTIONS = ' ' "
* I_BUDGET_PERIOD = "FM: Budget Period

IMPORTING
E_FUND_STATUS = "
E_FLG_ERROR = "

EXCEPTIONS
INVALID_EXP_DATE = 1 INVALID_CAN_DATE = 2 FISCAL_YEAR_VARIANT_EMPTY = 3 FUND_BUDGET_PD_INVALID = 4
.



IMPORTING Parameters details for FM_FG_FUND_STATUS

I_FM_AREA - FM area

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

I_FUND -

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

I_FUND_DATE -

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

I_FISCAL_YEAR - Fiscal year

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

I_FLG_EXCEPTIONS -

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

I_BUDGET_PERIOD - FM: Budget Period

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

EXPORTING Parameters details for FM_FG_FUND_STATUS

E_FUND_STATUS -

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

E_FLG_ERROR -

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

EXCEPTIONS details

INVALID_EXP_DATE - Invalid expiration date

Data type:
Optional: No
Call by Reference: Yes

INVALID_CAN_DATE - Invalid cancellation date

Data type:
Optional: No
Call by Reference: Yes

FISCAL_YEAR_VARIANT_EMPTY - Fiscal year variant empty for FM area (table FM01)

Data type:
Optional: No
Call by Reference: Yes

FUND_BUDGET_PD_INVALID - Fund and Budget Period combination is invalid

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for FM_FG_FUND_STATUS 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_fm_area  TYPE FMFINCODE-FIKRS, "   
lv_e_fund_status  TYPE FMBUDSTA-FUND_STATUS, "   
lv_invalid_exp_date  TYPE FMBUDSTA, "   
lv_i_fund  TYPE FMFINCODE-FINCODE, "   
lv_e_flg_error  TYPE SY-SUBRC, "   
lv_invalid_can_date  TYPE SY, "   
lv_i_fund_date  TYPE SY-DATUM, "   
lv_fiscal_year_variant_empty  TYPE SY, "   
lv_i_fiscal_year  TYPE FMIOI-GJAHR, "   
lv_fund_budget_pd_invalid  TYPE FMIOI, "   
lv_i_flg_exceptions  TYPE FMIOI, "   SPACE
lv_i_budget_period  TYPE FM_BUDGET_PERIOD. "   

  CALL FUNCTION 'FM_FG_FUND_STATUS'  "Return the US Fed. Gov. fund status (unexp, expired, canc)
    EXPORTING
         I_FM_AREA = lv_i_fm_area
         I_FUND = lv_i_fund
         I_FUND_DATE = lv_i_fund_date
         I_FISCAL_YEAR = lv_i_fiscal_year
         I_FLG_EXCEPTIONS = lv_i_flg_exceptions
         I_BUDGET_PERIOD = lv_i_budget_period
    IMPORTING
         E_FUND_STATUS = lv_e_fund_status
         E_FLG_ERROR = lv_e_flg_error
    EXCEPTIONS
        INVALID_EXP_DATE = 1
        INVALID_CAN_DATE = 2
        FISCAL_YEAR_VARIANT_EMPTY = 3
        FUND_BUDGET_PD_INVALID = 4
. " FM_FG_FUND_STATUS




ABAP code using 7.40 inline data declarations to call FM FM_FG_FUND_STATUS

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 FIKRS FROM FMFINCODE INTO @DATA(ld_i_fm_area).
 
"SELECT single FUND_STATUS FROM FMBUDSTA INTO @DATA(ld_e_fund_status).
 
 
"SELECT single FINCODE FROM FMFINCODE INTO @DATA(ld_i_fund).
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_e_flg_error).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_fund_date).
 
 
"SELECT single GJAHR FROM FMIOI INTO @DATA(ld_i_fiscal_year).
 
 
DATA(ld_i_flg_exceptions) = ' '.
 
 


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!