Fonction SAP BAPI_WAGE_COMP_EXT_DELETE - Deletion of External Wage Component

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
EMPLOYEENUMBER BAPI_WAGE_COMP_KEY-EMPLOYEENUMBER N 8 Personnel Number
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
TESTRUN BAPI_STAND-NO_COMMIT C 1 X Test Run (No Database Update)
VALIDITYBEGIN BAPI_WAGE_COMP_KEY-VALIDITYBEGIN D 8 Valid From Date
VALIDITYEND BAPI_WAGE_COMP_KEY-VALIDITYEND D 8 Valid To Date

Paramètre Reférence Long. Facultatif Description
RETURN BAPIRET2 548 Return Parameter

Functionality
This function module deletes an existing record of the ExternalSalary Elements infotype (0579) in HR.
Before you use this BAPI, use the EEWageComponentExt.GetListBAPI to determine the key of the record to be deleted.
This is the only method you can use for deleting transferred records.You cannot delete transferred records in HR.
The function module runs the following data checks. If the check isnegative, 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 retroactive 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 end date of the
        • salary element. If the employee is not active, the run payroll to
          date in the Payroll Status infotype (0003) is set. No errorsare returned.

          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 orBapiService.TransactionRollback methods. We recommend several BAPIcalls (20 to 100) before you set a Commit.
          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 data 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
                  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
                  Structure in which all error and success messages are returned.