SAP Function Modules

HR_RO_READ_PYRES_INTERVAL SAP Function module - Read and process payroll results







HR_RO_READ_PYRES_INTERVAL 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_RO_READ_PYRES_INTERVAL into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM HR_RO_READ_PYRES_INTERVAL - HR RO READ PYRES INTERVAL





CALL FUNCTION 'HR_RO_READ_PYRES_INTERVAL' "Read and process payroll results
  EXPORTING
    pernr =                     " pernr-pernr
    mode =                      " char1
    begda =                     " begda
    endda =                     " endda
*   inper =                     " pc261-inper   In-period for payroll
*   bondt =                     " pc261-bondt
*   payty =                     " pc261-payty
*   payid =                     " pc261-payid
    tprun =                     " char1
    tpall =                     " char1
*   initb =                     " char1         Init buffer
* TABLES
*   runs =                      " propy_runs_t
*   myrg =                      " propy_myrg_t
*   rtdet =                     " hrpayro_tab_of_results  Type for a table of payroll results
*   rtrun =                     " propy_rtrun_t
*   rtall =                     " pc207
    .  "  HR_RO_READ_PYRES_INTERVAL

ABAP code example for Function Module HR_RO_READ_PYRES_INTERVAL





The ABAP code below is a full code listing to execute function module HR_RO_READ_PYRES_INTERVAL 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:
it_runs  TYPE STANDARD TABLE OF PROPY_RUNS_T,"TABLES PARAM
wa_runs  LIKE LINE OF it_runs ,
it_myrg  TYPE STANDARD TABLE OF PROPY_MYRG_T,"TABLES PARAM
wa_myrg  LIKE LINE OF it_myrg ,
it_rtdet  TYPE STANDARD TABLE OF HRPAYRO_TAB_OF_RESULTS,"TABLES PARAM
wa_rtdet  LIKE LINE OF it_rtdet ,
it_rtrun  TYPE STANDARD TABLE OF PROPY_RTRUN_T,"TABLES PARAM
wa_rtrun  LIKE LINE OF it_rtrun ,
it_rtall  TYPE STANDARD TABLE OF PC207,"TABLES PARAM
wa_rtall  LIKE LINE OF it_rtall .


DATA(ld_pernr) = Check type of data required
DATA(ld_mode) = 'Check type of data required'.
DATA(ld_begda) = 'Check type of data required'.
DATA(ld_endda) = 'Check type of data required'.

DATA(ld_inper) = some text here

DATA(ld_bondt) = 20210129

DATA(ld_payty) = some text here

DATA(ld_payid) = some text here
DATA(ld_tprun) = 'Check type of data required'.
DATA(ld_tpall) = 'Check type of data required'.
DATA(ld_initb) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_runs to it_runs.

"populate fields of struture and append to itab
append wa_myrg to it_myrg.

"populate fields of struture and append to itab
append wa_rtdet to it_rtdet.

"populate fields of struture and append to itab
append wa_rtrun to it_rtrun.

"populate fields of struture and append to itab
append wa_rtall to it_rtall. . CALL FUNCTION 'HR_RO_READ_PYRES_INTERVAL' EXPORTING pernr = ld_pernr mode = ld_mode begda = ld_begda endda = ld_endda * inper = ld_inper * bondt = ld_bondt * payty = ld_payty * payid = ld_payid tprun = ld_tprun tpall = ld_tpall * initb = ld_initb * TABLES * runs = it_runs * myrg = it_myrg * rtdet = it_rtdet * rtrun = it_rtrun * rtall = it_rtall . " HR_RO_READ_PYRES_INTERVAL
IF SY-SUBRC EQ 0. "All OK 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_pernr  TYPE PERNR-PERNR ,
it_runs  TYPE STANDARD TABLE OF PROPY_RUNS_T ,
wa_runs  LIKE LINE OF it_runs,
ld_mode  TYPE CHAR1 ,
it_myrg  TYPE STANDARD TABLE OF PROPY_MYRG_T ,
wa_myrg  LIKE LINE OF it_myrg,
ld_begda  TYPE BEGDA ,
it_rtdet  TYPE STANDARD TABLE OF HRPAYRO_TAB_OF_RESULTS ,
wa_rtdet  LIKE LINE OF it_rtdet,
ld_endda  TYPE ENDDA ,
it_rtrun  TYPE STANDARD TABLE OF PROPY_RTRUN_T ,
wa_rtrun  LIKE LINE OF it_rtrun,
ld_inper  TYPE PC261-INPER ,
it_rtall  TYPE STANDARD TABLE OF PC207 ,
wa_rtall  LIKE LINE OF it_rtall,
ld_bondt  TYPE PC261-BONDT ,
ld_payty  TYPE PC261-PAYTY ,
ld_payid  TYPE PC261-PAYID ,
ld_tprun  TYPE CHAR1 ,
ld_tpall  TYPE CHAR1 ,
ld_initb  TYPE CHAR1 .


ld_pernr = Check type of data required

"populate fields of struture and append to itab
append wa_runs to it_runs.
ld_mode = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_myrg to it_myrg.
ld_begda = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_rtdet to it_rtdet.
ld_endda = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_rtrun to it_rtrun.

ld_inper = some text here

"populate fields of struture and append to itab
append wa_rtall to it_rtall.

ld_bondt = 20210129

ld_payty = some text here

ld_payid = some text here
ld_tprun = 'Check type of data required'.
ld_tpall = 'Check type of data required'.
ld_initb = 'Check type of data required'.

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_RO_READ_PYRES_INTERVAL or its description.