Ansicht
Dokumentation

HRPCMPVA - User Exit for Variable Argument - Program RPITIC00

HRPCMPVA - User Exit for Variable Argument - Program RPITIC00

TXBHW - Original Tax Base Amount in Local Currency   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

This user exit is used in the executable program RPITIG00 to create variable arguments for the tables VS (variable balances) and CVS (cummulated variable balances) and the time evaluation cluster B2.
You can use the following variables and internal tables for reporting:

Variable Meaning
PPERNR Personnel number
PSGRPLVL_BEGDA Start date of current pay scale
reclassification
EMPLOYEE_AGE Age in years
YEARS_OF_SENIORITY Length of service in years
HIRE_DATE Hiring date
FIRE_DATE Leaving date
WORK_HOURS_LIMIT Limit of hours worked
AGE_LIMIT Limit for pay scale age jump
SENIORITY_LIMIT Limit for length of service
Tabelle Meaning
PP0000 Actions
PP0001 Organizational Assignment
PP0002 Personal Data
PP0003 Payroll Status
PP0007 Planned Working Time
PP0008 Basic Pay
P_ERROR_TAB Internal Error Table

Fill the variable VS_IDENTIFIER to identify the variable balances with a maximum of four-character indicator. This indicator allows you to store different variable balances per day in the tables VS and CVS and to group them according to meaning. When you choose an indicator, do not use the standard indicator 'ITIG'.

In addition, you must fill the internal table VAR_ARGUMENT. This table references the following structure:

Field name Meaning
TABNAME Table name
FIELDNAME Local field name
FIELDVALUE Character 40-positions (field value)
LENGTH Length of field (number of characters)

The variable argument is made up of the contents of one or more of the fields. The value and length of the variable argument are determined by the entries in these internal tables.
For the required fields and their positions in the table, use the fields and their order in your modified personnel calculation rule to fill the key in tables VS and CVS in the time evaluation cluster B2. For additional information, refer to the following section of the Personnel Administration Implementation Guide Define rules for determining hours worked.

There are two ways to fill table VAR_ARGUMENT:

  1. If the required field exists in the data repository, you must fill the table names, the field names and the field's contents. You can leave the field length empty as the length is defined by the data repository in this instance.
  2. If there is no reference to the data repository, leave the table and field names empty and only fill the field's contents and length.

You can use the internal error table P_ERROR_TAB and the switch REJECT_PERNR for error handling. The error table has the following structure:

Field name Meaning
PERNR Personnel number
ARBGB Message ID
MSGTY Message type (E,I,W,...)
MSGNO Message number
MSGV1 Message variable 01
MSGV2 Message variable 02
MSGV3 Message variable 03
MSGV4 Message variable 04

If, due to an error, you want to stop the further processing of a personnel number, set the switch REJECT_PERNR to 'X' after filling.

The following standard processing with the ID 'TEST' represents an example:

*-Data definitions

  DATA:   TABLE_ARG(4),

          ERR_TAB_WA LIKE HRERROR.

  TABLES: T503.

*-Set identifier

  VS_IDENTIFIER      = 'TEST'.

*-Fill internal table VAR_ARGUMENT

  VAR_ARGUMENT-TABNAME    = 'P0008'.

  VAR_ARGUMENT-FIELDNAME  = 'TRFAR'.

  VAR_ARGUMENT-FIELDVALUE = PP0008-TRFAR.

  APPEND VAR_ARGUMENT.

  VAR_ARGUMENT-TABNAME    = 'P0008'.

  VAR_ARGUMENT-FIELDNAME  = 'TRFGB'.

  VAR_ARGUMENT-FIELDVALUE = PP0008-TRFGB.

  APPEND VAR_ARGUMENT.

  VAR_ARGUMENT-TABNAME    = 'P0008'.

  VAR_ARGUMENT-FIELDNAME  = 'TRFGR'.

  VAR_ARGUMENT-FIELDVALUE = PP0008-TRFGR.

  APPEND VAR_ARGUMENT.

  VAR_ARGUMENT-TABNAME    = 'P0008'.

  VAR_ARGUMENT-FIELDNAME  = 'TRFST'.

  VAR_ARGUMENT-FIELDVALUE = PP0008-TRFST.

  APPEND VAR_ARGUMENT.

  VAR_ARGUMENT-TABNAME    = 'T503 '.

  VAR_ARGUMENT-FIELDNAME  = 'TRFKZ'.

  SELECT SINGLE * FROM T503 WHERE PERSG EQ PP0001-PERSG

                              AND PERSK EQ PP0001-PERSK.

  IF SY-SUBRC NE 0.

*---Error handling

    CLEAR T503.                           "Clear table work area

*---Process faulty table argument

    CONCATENATE PP0001-PERSG PP0001-PERSK INTO TABLE_ARG

                                          SEPARATED BY SPACE.

*---Fill error table work area and append it to the error table ERR_TAB

    ERR_TAB_WA-PERNR = PPERNR.            "Personnel number

    ERR_TAB_WA-ARBGB = '72'.              "Message area

    ERR_TAB_WA-MSGTY = 'E'.               "Message type

    ERR_TAB_WA-MSGNO = '002'.             "Message number

    ERR_TAB_WA-MSGV1 = TABLE_ARG.         "1. message variable

    ERR_TAB_WA-MSGV2 = SPACE.             "2. message variable

    ERR_TAB_WA-MSGV3 = SPACE.             "3. message variable

    ERR_TAB_WA-MSGV4 = SPACE.             "4. message variable

    APPEND ERR_TAB_WA TO P_ERROR_TAB.

*---Permit no further processing of the current personnel number

    REJECT_PERNR = 'X'.

  ELSE.

*---No error -> okay to continue

    VAR_ARGUMENT-FIELDVALUE = T503-TRFKZ.

    APPEND VAR_ARGUMENT.

  ENDIF.






Vendor Master (General Section)   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 10944 Date: 20240424 Time: 114655     sap01-206 ( 70 ms )