SAP Function Modules

PYXX_READ_DATA_PAYRESULT SAP Function module - CAZZ: Reads any Field Content from Payroll Result







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

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


Pattern for FM PYXX_READ_DATA_PAYRESULT - PYXX READ DATA PAYRESULT





CALL FUNCTION 'PYXX_READ_DATA_PAYRESULT' "CAZZ: Reads any Field Content from Payroll Result
  EXPORTING
    clusterid =                 " pcl2-relid
    employeenumber =            " pc200-pernr
*   read_only_international = 'X'  " rpuxxxxx-kr_feld1
*   clear_directory_buffer =    " rpuxxxxx-kr_feld2
*   for_period = '000000'       " pc261-fpper
*   in_period = '000000'        " pc261-inper
*   pay_type = SPACE            " pc261-payty
*   pay_id = SPACE              " pc261-payid
*   bonus_date = '00000000'     " pc261-bondt
*   off_cycle_reason = SPACE    " pc261-ocrsn
*   actual = 'A'                " pc261-srtza
*   tabname =                   "
*   key1 =                      "
*   key1_value =                "
*   key2 =                      "
*   key2_value =                "
*   key3 =                      "
*   key3_value =                "
*   key4 =                      "
*   key4_value =                "
*   key5 =                      "
*   key5_value =                "
*   field =                     "
*   currency_field =            "
  IMPORTING
    value =                     "
* TABLES
*   table =                     "
  EXCEPTIONS
    NO_PAYROLL_RESULTS = 1      "
    RESULT_NOT_FOUND_IN_DIRECTORY = 2  "
    TABNAME_NOT_FOUND = 3       "
    TABLE_ENTRY_NOT_FOUND = 4   "
    TABLE_FIELD_NOT_FOUND = 5   "
    IMPORT_ERROR = 6            "
    .  "  PYXX_READ_DATA_PAYRESULT

ABAP code example for Function Module PYXX_READ_DATA_PAYRESULT





The ABAP code below is a full code listing to execute function module PYXX_READ_DATA_PAYRESULT 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_value  TYPE STRING ,
it_table  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_table  LIKE LINE OF it_table .


SELECT single RELID
FROM PCL2
INTO @DATA(ld_clusterid).


DATA(ld_employeenumber) = Check type of data required

DATA(ld_read_only_international) = some text here

DATA(ld_clear_directory_buffer) = some text here

DATA(ld_for_period) = some text here

DATA(ld_in_period) = some text here

DATA(ld_pay_type) = some text here

DATA(ld_pay_id) = some text here

DATA(ld_bonus_date) = 20210129

DATA(ld_off_cycle_reason) = some text here

DATA(ld_actual) = some text here
DATA(ld_tabname) = 'some text here'.
DATA(ld_key1) = 'some text here'.
DATA(ld_key1_value) = 'some text here'.
DATA(ld_key2) = 'some text here'.
DATA(ld_key2_value) = 'some text here'.
DATA(ld_key3) = 'some text here'.
DATA(ld_key3_value) = 'some text here'.
DATA(ld_key4) = 'some text here'.
DATA(ld_key4_value) = 'some text here'.
DATA(ld_key5) = 'some text here'.
DATA(ld_key5_value) = 'some text here'.
DATA(ld_field) = 'some text here'.
DATA(ld_currency_field) = 'some text here'.

"populate fields of struture and append to itab
append wa_table to it_table. . CALL FUNCTION 'PYXX_READ_DATA_PAYRESULT' EXPORTING clusterid = ld_clusterid employeenumber = ld_employeenumber * read_only_international = ld_read_only_international * clear_directory_buffer = ld_clear_directory_buffer * for_period = ld_for_period * in_period = ld_in_period * pay_type = ld_pay_type * pay_id = ld_pay_id * bonus_date = ld_bonus_date * off_cycle_reason = ld_off_cycle_reason * actual = ld_actual * tabname = ld_tabname * key1 = ld_key1 * key1_value = ld_key1_value * key2 = ld_key2 * key2_value = ld_key2_value * key3 = ld_key3 * key3_value = ld_key3_value * key4 = ld_key4 * key4_value = ld_key4_value * key5 = ld_key5 * key5_value = ld_key5_value * field = ld_field * currency_field = ld_currency_field IMPORTING value = ld_value * TABLES * table = it_table EXCEPTIONS NO_PAYROLL_RESULTS = 1 RESULT_NOT_FOUND_IN_DIRECTORY = 2 TABNAME_NOT_FOUND = 3 TABLE_ENTRY_NOT_FOUND = 4 TABLE_FIELD_NOT_FOUND = 5 IMPORT_ERROR = 6 . " PYXX_READ_DATA_PAYRESULT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "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_value  TYPE STRING ,
ld_clusterid  TYPE PCL2-RELID ,
it_table  TYPE STANDARD TABLE OF STRING ,
wa_table  LIKE LINE OF it_table,
ld_employeenumber  TYPE PC200-PERNR ,
ld_read_only_international  TYPE RPUXXXXX-KR_FELD1 ,
ld_clear_directory_buffer  TYPE RPUXXXXX-KR_FELD2 ,
ld_for_period  TYPE PC261-FPPER ,
ld_in_period  TYPE PC261-INPER ,
ld_pay_type  TYPE PC261-PAYTY ,
ld_pay_id  TYPE PC261-PAYID ,
ld_bonus_date  TYPE PC261-BONDT ,
ld_off_cycle_reason  TYPE PC261-OCRSN ,
ld_actual  TYPE PC261-SRTZA ,
ld_tabname  TYPE STRING ,
ld_key1  TYPE STRING ,
ld_key1_value  TYPE STRING ,
ld_key2  TYPE STRING ,
ld_key2_value  TYPE STRING ,
ld_key3  TYPE STRING ,
ld_key3_value  TYPE STRING ,
ld_key4  TYPE STRING ,
ld_key4_value  TYPE STRING ,
ld_key5  TYPE STRING ,
ld_key5_value  TYPE STRING ,
ld_field  TYPE STRING ,
ld_currency_field  TYPE STRING .


SELECT single RELID
FROM PCL2
INTO ld_clusterid.


"populate fields of struture and append to itab
append wa_table to it_table.

ld_employeenumber = Check type of data required

ld_read_only_international = some text here

ld_clear_directory_buffer = some text here

ld_for_period = some text here

ld_in_period = some text here

ld_pay_type = some text here

ld_pay_id = some text here

ld_bonus_date = 20210129

ld_off_cycle_reason = some text here

ld_actual = some text here
ld_tabname = 'some text here'.
ld_key1 = 'some text here'.
ld_key1_value = 'some text here'.
ld_key2 = 'some text here'.
ld_key2_value = 'some text here'.
ld_key3 = 'some text here'.
ld_key3_value = 'some text here'.
ld_key4 = 'some text here'.
ld_key4_value = 'some text here'.
ld_key5 = 'some text here'.
ld_key5_value = 'some text here'.
ld_field = 'some text here'.
ld_currency_field = '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 PYXX_READ_DATA_PAYRESULT or its description.