SAP Function Modules

HR_MX_INFO_CALC_PRCNT SAP Function module







HR_MX_INFO_CALC_PRCNT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name HR_MX_INFO_CALC_PRCNT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: HRPAYMX01
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM HR_MX_INFO_CALC_PRCNT - HR MX INFO CALC PRCNT





CALL FUNCTION 'HR_MX_INFO_CALC_PRCNT' "
  EXPORTING
    feleg =                     " p0370-begda
    fecha =                     " p0370-begda
    pdecr =                     " p0370-pdecr
    saldi =                     " pc207-betrg
*   werks =                     " t7mx0p-werks
*   btrtl =                     " t7mx0p-btrtl
*   iv_bukrs =                  " p0001-bukrs
*   iv_persg =                  " p0001-persg
*   iv_persk =                  " p0001-persk
*   iv_abkrs =                  " p0001-abkrs
  IMPORTING
    pnuev =                     " p0370-pdecr
    sw_act_prcnt =              " c
* CHANGING
*   zoeco =                     " t7mx62-zoeco
  EXCEPTIONS
    WRONG_ECONOMIC_ZONE = 1     "
    .  "  HR_MX_INFO_CALC_PRCNT

ABAP code example for Function Module HR_MX_INFO_CALC_PRCNT





The ABAP code below is a full code listing to execute function module HR_MX_INFO_CALC_PRCNT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_pnuev  TYPE P0370-PDECR ,
ld_sw_act_prcnt  TYPE C .


SELECT single ZOECO
FROM T7MX62
INTO @DATA(ld_zoeco).


DATA(ld_feleg) = 20210129

DATA(ld_fecha) = 20210129

DATA(ld_pdecr) = Check type of data required

DATA(ld_saldi) = 20.50

SELECT single WERKS
FROM T7MX0P
INTO @DATA(ld_werks).


SELECT single BTRTL
FROM T7MX0P
INTO @DATA(ld_btrtl).


DATA(ld_iv_bukrs) = some text here

DATA(ld_iv_persg) = some text here

DATA(ld_iv_persk) = some text here

DATA(ld_iv_abkrs) = some text here . CALL FUNCTION 'HR_MX_INFO_CALC_PRCNT' EXPORTING feleg = ld_feleg fecha = ld_fecha pdecr = ld_pdecr saldi = ld_saldi * werks = ld_werks * btrtl = ld_btrtl * iv_bukrs = ld_iv_bukrs * iv_persg = ld_iv_persg * iv_persk = ld_iv_persk * iv_abkrs = ld_iv_abkrs IMPORTING pnuev = ld_pnuev sw_act_prcnt = ld_sw_act_prcnt * CHANGING * zoeco = ld_zoeco EXCEPTIONS WRONG_ECONOMIC_ZONE = 1 . " HR_MX_INFO_CALC_PRCNT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_zoeco  TYPE T7MX62-ZOECO ,
ld_pnuev  TYPE P0370-PDECR ,
ld_feleg  TYPE P0370-BEGDA ,
ld_sw_act_prcnt  TYPE C ,
ld_fecha  TYPE P0370-BEGDA ,
ld_pdecr  TYPE P0370-PDECR ,
ld_saldi  TYPE PC207-BETRG ,
ld_werks  TYPE T7MX0P-WERKS ,
ld_btrtl  TYPE T7MX0P-BTRTL ,
ld_iv_bukrs  TYPE P0001-BUKRS ,
ld_iv_persg  TYPE P0001-PERSG ,
ld_iv_persk  TYPE P0001-PERSK ,
ld_iv_abkrs  TYPE P0001-ABKRS .


SELECT single ZOECO
FROM T7MX62
INTO ld_zoeco.


ld_feleg = 20210129

ld_fecha = 20210129

ld_pdecr = Check type of data required

ld_saldi = 20.50

SELECT single WERKS
FROM T7MX0P
INTO ld_werks.


SELECT single BTRTL
FROM T7MX0P
INTO ld_btrtl.


ld_iv_bukrs = some text here

ld_iv_persg = some text here

ld_iv_persk = some text here

ld_iv_abkrs = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HR_MX_INFO_CALC_PRCNT or its description.