SAP GM_CHECK_VALUE_TYPE Function Module for Check Value Type's Validity for Grant









GM_CHECK_VALUE_TYPE is a standard gm check value type SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check Value Type's Validity for Grant 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 check value type FM, simply by entering the name GM_CHECK_VALUE_TYPE into the relevant SAP transaction such as SE37 or SE38.

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



Function GM_CHECK_VALUE_TYPE 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_CHECK_VALUE_TYPE'"Check Value Type's Validity for Grant
EXPORTING
I_GRANT_NBR = "Grant
I_VALUE_TYPE = "Value Type
I_POSTING_DATE = "Posting date in the document

IMPORTING
E_STATISTICAL = "Does this value type posts statistically ?
E_FROM_GRANT = "Indicator Specified on Grant Master

EXCEPTIONS
INVALID_DATE_RANGE = 1 BLOCKED_VALUE_TYPE = 2 ALL_BLOCKED = 3 NO_VALUETYPE_FOR_GRANT = 4 INVALID_GRANT = 5
.



IMPORTING Parameters details for GM_CHECK_VALUE_TYPE

I_GRANT_NBR - Grant

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

I_VALUE_TYPE - Value Type

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

I_POSTING_DATE - Posting date in the document

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

EXPORTING Parameters details for GM_CHECK_VALUE_TYPE

E_STATISTICAL - Does this value type posts statistically ?

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

E_FROM_GRANT - Indicator Specified on Grant Master

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

EXCEPTIONS details

INVALID_DATE_RANGE - Posting date is outside of valid time interval

Data type:
Optional: No
Call by Reference: Yes

BLOCKED_VALUE_TYPE - Value type is blocked

Data type:
Optional: No
Call by Reference: Yes

ALL_BLOCKED - All value types are blocked

Data type:
Optional: No
Call by Reference: Yes

NO_VALUETYPE_FOR_GRANT - Value type does not exist for Grant

Data type:
Optional: No
Call by Reference: Yes

INVALID_GRANT - Grant number does not exist

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GM_CHECK_VALUE_TYPE 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_grant_nbr  TYPE GM_GRANT_NBR, "   
lv_e_statistical  TYPE GM_STATISTICAL, "   
lv_invalid_date_range  TYPE GM_STATISTICAL, "   
lv_e_from_grant  TYPE GM_STAT_IND_FROM_GRANT, "   
lv_i_value_type  TYPE GM_VALUETYPE, "   
lv_blocked_value_type  TYPE GM_VALUETYPE, "   
lv_all_blocked  TYPE GM_VALUETYPE, "   
lv_i_posting_date  TYPE BUDAT, "   
lv_no_valuetype_for_grant  TYPE BUDAT, "   
lv_invalid_grant  TYPE BUDAT. "   

  CALL FUNCTION 'GM_CHECK_VALUE_TYPE'  "Check Value Type's Validity for Grant
    EXPORTING
         I_GRANT_NBR = lv_i_grant_nbr
         I_VALUE_TYPE = lv_i_value_type
         I_POSTING_DATE = lv_i_posting_date
    IMPORTING
         E_STATISTICAL = lv_e_statistical
         E_FROM_GRANT = lv_e_from_grant
    EXCEPTIONS
        INVALID_DATE_RANGE = 1
        BLOCKED_VALUE_TYPE = 2
        ALL_BLOCKED = 3
        NO_VALUETYPE_FOR_GRANT = 4
        INVALID_GRANT = 5
. " GM_CHECK_VALUE_TYPE




ABAP code using 7.40 inline data declarations to call FM GM_CHECK_VALUE_TYPE

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.

 
 
 
 
 
 
 
 
 
 


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!