Fonction SAP BAPI_WAGE_COMP_EXT_CREATE - Creation of Infotype Record for External Wage Component

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
COSTASSIGNMENT BAPI_WAGE_COMP_COST_ASSIGN u 148 X HR Interface: Cost Distribution for External Wage Component
EMPLOYEENUM BAPI_WAGE_COMP_KEY-EMPLOYEENUMBER N 8 Personnel Number
TESTRUN BAPI_STAND-NO_COMMIT C 1 X Test Run (No Database Update)
VALIDITYDATE BAPI_WAGE_COMP_KEY-VALIDITYBEGIN D 8 HR Interface: Data for External Wage Components
WAGECOMPDATA BAPI_WAGE_COMP_DATA u 93 General Data for External Wage Component

Paramètre Reférence Type Long. Description
EMPLOYEENUMBER BAPI_WAGE_COMP_KEY-EMPLOYEENUMBER N 8 HR Master Record Infotype 0579 (Ext. Wage Components)
LOCKINDICATOR BAPI_WAGE_COMP_KEY-LOCKINDICATOR C 1 Lock Indicator for HR Master Data Record
OBJECTID BAPI_WAGE_COMP_KEY-OBJECTID C 2 Object Identification
RECORDNUMBER BAPI_WAGE_COMP_KEY-RECORDNUMBER N 3 Number of Infotype Record with Same Key
SUBTYPE BAPI_WAGE_COMP_KEY-SUBTYPE C 4 Subtype
VALIDITYBEGIN BAPI_WAGE_COMP_KEY-VALIDITYBEGIN D 8 Valid From Date
VALIDITYEND BAPI_WAGE_COMP_KEY-VALIDITYEND D 8

Paramètre Reférence Long. Facultatif Description
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
RETURN BAPIRET2 548 Return Parameter

Functionality
This function module creates a new record for the External SalaryElements infotype (0579).
With this BAPI, you transfer your salary elements to HR. The HR systemthen saves the elements as an infotype record and they are processedfurther in Payroll.
This is the only method available for creating records for theSalary Elements infotype (0579). You cannot create the recordsdirectly in HR.
To ensure that all tests for the creation of a new infotype record arerun, you can use the BAPI in a test run. The Test run parameteris flagged as a default value.
The function module runs the following data checks and if the check hasa negative result, it returns an error:

  • The personnel number exists in HR.

  • The date on which the salary elements are transferred to Payroll is
  • later than the earliest personal retroactiveo accounting date inthe Payroll Status infotype (0003) for the employee and is alsolater than the earliest retroactive accounting date in thecontrol record for the employee's payroll area.
    • The account assignment object (account assignment block, posting
    • information) is valid.
      • The HR wage type exists for the employee's country and is permitted for
      • transfer from the application.
        • The employee is actively employed on the validity date for the salary
        • element. If the employee is not active, the run payroll to dateis set in the Payroll Status infotype (0003). This means that aretroactive run is triggered with the next payroll run. No errors arereturned.

          Notes

          Database update
          The BAPI does not execute a Commit Work operation. This avoidsdatabase updates for each created record. You can control databaseupdates using the BapiService.TransactionCommit andBapiService.TransactionRollback methods. We recommend that you useseveral BAPI calls (20 to 100) before you set a Commit operation
          The personnel number is locked from the point when the BAPI is calledto the point when infotypes 0579 and 0003 are updated. The number ofpersonnel numbers processed between two Commits should be chosenaccordingly:

          • If the personnel number lock is critical, you should set a Commit more
          • frequently.
            • If the performance is critical, you should process as many personnel
            • numbers as possible between two Commits.

              Locked personnel numbers

              • Personnel numbers are rejected if they are locked at the time of the
              • transfer. This is the case if, for example, master is edited for apersonnel number.

                Payroll status

                • If the payroll area for a personnel number has the status Released
                • for Payroll, you cannot make any changes to the infotype records forthis personnel number for the current and past payroll periods. Thepersonnel number is then not rejected but it is stored in matchcode Wso that it can be processed in the correction run for Payroll.

                  Retroactive changes
                  If salary elements are transferred and they were due in a period forwhich payroll has already been run, the earliest master data change
                  date is set in the Payroll Status infotype (0003) so that aretroactive run is triggered.

                  Description
                  Specification of the cost assignment for the salary element isoptional.

                  Default
                  If no cost assignment is given, the salary element is given the samecost assignment as the employee (taken from HR) in the payroll run(infotypes 0001 and 0027 - Organizational Assignment and CostDistribution)

                  Description
                  If you want to perform a test run, set TestRun to 'X'.

                  Value range
                  'X' - Test run
                  SPACE - Update (the module does not perform a Commit)

                  Default
                  SPACE
                  The function module generally performs a database update (defaultsettings). This can be triggered with the BapiService.TransactionCommitor reset with the BapiService.Transactionollback.

                  Description
                  HR runs payroll for the salary element in the period containing thisdate.
                  The date is stored in the key fields of the HR infotype as the validitystart and end date. This is because the salary element is only assignedto one date.

                  Description
                  General data on the salary element (origin, reference number inoriginal application, logical system for original application, wagetype, and amount).

                  Description
                  Structure for enhancements by customer or partner - the additionalinformation is entered here. To process the information, a BusinessAdd-In, which is contained in the implementation of this BAPI must beused.

                  Value range

                  Description
                  Structure in which all error and success messages are returned. werden.