SAP EXIT_SAPLCMPEXITS_004 Function Module for User Exit: Customer-Specific Calculation Variants for Guidelines









EXIT_SAPLCMPEXITS_004 is a standard exit saplcmpexits 004 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for User Exit: Customer-Specific Calculation Variants for Guidelines 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 exit saplcmpexits 004 FM, simply by entering the name EXIT_SAPLCMPEXITS_004 into the relevant SAP transaction such as SE37 or SE38.

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



Function EXIT_SAPLCMPEXITS_004 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 'EXIT_SAPLCMPEXITS_004'"User Exit: Customer-Specific Calculation Variants for Guidelines
EXPORTING
_VARIANT = "Calculation Variant
_BETRAG_OLD = "Previous Employee Earnings (monetary)
_PRCNT_OLD = "Periodic Percentage Increase
_AMNT_OLD = "Previous Quantity-Based Calculated Compensations
_WAERS = "Currency of Amounts
_GL_BETR = "Amonunt Returned by Guideline
_GL_PRCNT = "Percentage Returned by Guideline
_GLAMNT = "Number Returned by Guideline

IMPORTING
_BETRAG_NEW = "New Employee Earnings (monetary)
_PRCNT_NEW = "New Percentage Increase
_AMNT_NEW = "New Quantity-Based Calculated Compensation
_LTI_AMNT_NEW = "New Number of Awards

EXCEPTIONS
CUST_USER_EXIT_ERROR = 1
.



Related Function Modules

Below is a list of related SAP function modules this CUSTOMER FUNCTION exit / user exit is relevant for.
HRCM_USER_EXIT_ACTIVATE
HRCM_USER_EXIT_CALC_BASE
HRCM_USER_EXIT_EFFECTIVE_DATE
HRCM_USER_EXIT_ELIGIBILITY
HRCM_USER_EXIT_GL_CALC_VARIANT
HRCM_USER_EXIT_GUIDELINES

IMPORTING Parameters details for EXIT_SAPLCMPEXITS_004

_VARIANT - Calculation Variant

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

_BETRAG_OLD - Previous Employee Earnings (monetary)

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

_PRCNT_OLD - Periodic Percentage Increase

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

_AMNT_OLD - Previous Quantity-Based Calculated Compensations

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

_WAERS - Currency of Amounts

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

_GL_BETR - Amonunt Returned by Guideline

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

_GL_PRCNT - Percentage Returned by Guideline

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

_GLAMNT - Number Returned by Guideline

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

EXPORTING Parameters details for EXIT_SAPLCMPEXITS_004

_BETRAG_NEW - New Employee Earnings (monetary)

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

_PRCNT_NEW - New Percentage Increase

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

_AMNT_NEW - New Quantity-Based Calculated Compensation

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

_LTI_AMNT_NEW - New Number of Awards

Data type: CMP_FNUMB
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 EXIT_SAPLCMPEXITS_004 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, "   
lv_cust_user_exit_error  TYPE P0380, "   
lv__prcnt_new  TYPE P0380-PCT01, "   
lv__betrag_old  TYPE P0380-BET01, "   
lv__amnt_new  TYPE P0380-ANZ01, "   
lv__prcnt_old  TYPE P0380-PCT01, "   
lv__amnt_old  TYPE CMP_FNUMB, "   
lv__lti_amnt_new  TYPE CMP_FNUMB, "   
lv__waers  TYPE P0380-WAERS, "   
lv__gl_betr  TYPE P0380-BET01, "   
lv__gl_prcnt  TYPE P0380-PCT01, "   
lv__glamnt  TYPE CMP_FNUMB. "   

  CALL FUNCTION 'EXIT_SAPLCMPEXITS_004'  "User Exit: Customer-Specific Calculation Variants for Guidelines
    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
         _GLAMNT = lv__glamnt
    IMPORTING
         _BETRAG_NEW = lv__betrag_new
         _PRCNT_NEW = lv__prcnt_new
         _AMNT_NEW = lv__amnt_new
         _LTI_AMNT_NEW = lv__lti_amnt_new
    EXCEPTIONS
        CUST_USER_EXIT_ERROR = 1
. " EXIT_SAPLCMPEXITS_004




ABAP code using 7.40 inline data declarations to call FM EXIT_SAPLCMPEXITS_004

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 ANZ01 FROM P0380 INTO @DATA(ld__amnt_new).
 
"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).
 
 


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!