SAP HRCM_USER_EXIT_GL_CALC_VARIANT Function Module for









HRCM_USER_EXIT_GL_CALC_VARIANT is a standard hrcm user exit gl calc variant SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 hrcm user exit gl calc variant FM, simply by entering the name HRCM_USER_EXIT_GL_CALC_VARIANT into the relevant SAP transaction such as SE37 or SE38.

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



Function HRCM_USER_EXIT_GL_CALC_VARIANT 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 'HRCM_USER_EXIT_GL_CALC_VARIANT'"
EXPORTING
VARIANT = "
BETRAG_OLD = "
PRCNT_OLD = "
AMNT_OLD = "
WAERS = "
GL_BETR = "
GL_PRCNT = "
GL_AMNT = "
* REACTION = ' ' "

IMPORTING
BETRAG_NEW = "
PRCNT_NEW = "
AMNT_NEW = "

TABLES
ERROR_TABLE = "

EXCEPTIONS
CUST_USER_EXIT_ERROR = 1
.



IMPORTING Parameters details for HRCM_USER_EXIT_GL_CALC_VARIANT

VARIANT -

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

BETRAG_OLD -

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

PRCNT_OLD -

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

AMNT_OLD -

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

WAERS -

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

GL_BETR -

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

GL_PRCNT -

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

GL_AMNT -

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

REACTION -

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

EXPORTING Parameters details for HRCM_USER_EXIT_GL_CALC_VARIANT

BETRAG_NEW -

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

PRCNT_NEW -

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

AMNT_NEW -

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

TABLES Parameters details for HRCM_USER_EXIT_GL_CALC_VARIANT

ERROR_TABLE -

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

EXCEPTIONS details

CUST_USER_EXIT_ERROR -

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

Copy and paste ABAP code example for HRCM_USER_EXIT_GL_CALC_VARIANT 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_variant  TYPE T71GT-VTYPE, "   
lv_betrag_new  TYPE P0380-BET01, "   
lt_error_table  TYPE STANDARD TABLE OF RPBENERR, "   
lv_cust_user_exit_error  TYPE RPBENERR, "   
lv_prcnt_new  TYPE P0380-PCT01, "   
lv_betrag_old  TYPE P0380-BET01, "   
lv_amnt_new  TYPE CMP_FNUMB, "   
lv_prcnt_old  TYPE P0380-PCT01, "   
lv_amnt_old  TYPE CMP_FNUMB, "   
lv_waers  TYPE P0380-WAERS, "   
lv_gl_betr  TYPE P0380-BET01, "   
lv_gl_prcnt  TYPE P0380-PCT01, "   
lv_gl_amnt  TYPE CMP_FNUMB, "   
lv_reaction  TYPE SY-MSGTY. "   SPACE

  CALL FUNCTION 'HRCM_USER_EXIT_GL_CALC_VARIANT'  "
    EXPORTING
         VARIANT = lv_variant
         BETRAG_OLD = lv_betrag_old
         PRCNT_OLD = lv_prcnt_old
         AMNT_OLD = lv_amnt_old
         WAERS = lv_waers
         GL_BETR = lv_gl_betr
         GL_PRCNT = lv_gl_prcnt
         GL_AMNT = lv_gl_amnt
         REACTION = lv_reaction
    IMPORTING
         BETRAG_NEW = lv_betrag_new
         PRCNT_NEW = lv_prcnt_new
         AMNT_NEW = lv_amnt_new
    TABLES
         ERROR_TABLE = lt_error_table
    EXCEPTIONS
        CUST_USER_EXIT_ERROR = 1
. " HRCM_USER_EXIT_GL_CALC_VARIANT




ABAP code using 7.40 inline data declarations to call FM HRCM_USER_EXIT_GL_CALC_VARIANT

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 VTYPE FROM T71GT INTO @DATA(ld_variant).
 
"SELECT single BET01 FROM P0380 INTO @DATA(ld_betrag_new).
 
 
 
"SELECT single PCT01 FROM P0380 INTO @DATA(ld_prcnt_new).
 
"SELECT single BET01 FROM P0380 INTO @DATA(ld_betrag_old).
 
 
"SELECT single PCT01 FROM P0380 INTO @DATA(ld_prcnt_old).
 
 
"SELECT single WAERS FROM P0380 INTO @DATA(ld_waers).
 
"SELECT single BET01 FROM P0380 INTO @DATA(ld_gl_betr).
 
"SELECT single PCT01 FROM P0380 INTO @DATA(ld_gl_prcnt).
 
 
"SELECT single MSGTY FROM SY INTO @DATA(ld_reaction).
DATA(ld_reaction) = ' '.
 


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!