SAP Check Employee Existence and Status

SAP Check Employee will help you identifiy if an Employee number PERNR exists and check if this number corresponds to an active employee. For Both check-up you will find the BAPI to use and the table to query if you are looking to optimize the performance.

SAP Check Employee Existence

SAP Check Employee Existence BAPI

The SAP Standard BAPI to check if an employee number exists in SAP is BAPI_EMPLOYEE_CHECKEXISTENCE.
It takes as input the PERNR (Employee Number) and the output will be a message.

  • If the PERNR exists, the RETURN will be empty.
  • If the PERNR doesn’t exist, the RETURN will contain the following error
    • TYPE E
    • CODE PG001
    • MESSAGE Personnel number not yet assigned
Check also   How to link STKO and STPO for BOM in SAP

If you digg into the BAPI_EMPLOYEE_CHECKEXISTENCE, there is a call to P_EMPLOYEE_CHECKEXISTENCE.
The return sy-subrc will be formatted into BAPI message with BALW_BAPIRETURN_GET.

SAP Check Employee Existence Table

The main table for SAP Employee are the PA0* Tables
To check if a SAP Employee number, just make a select from the table PA003 Payroll Status.
You can also check the table PA0002 for HR Master Record: Infotype 0002 (Personal Data).

For more detail about employees handling on SAP check Employee Central

SAP Check Employee Status

SAP Check Employee Status BAPI

In order to check if an Employee is active, you can use the Standard BAPI HR_PT_CHECK_EMPLOYEE_ACTIVE. 

SAP Check Employee Existence Table

In SAP HR tables, Status for Employee is stored in PA0000 ( HR Master Record: Infotype 0000 (Actions) )

Check also   How to use EXPORT or IMPORT data to / from ABAP Memory ID

Check the following fields for SAP Employee information:

  • STAT1    Customer-Specific Status
    • Status 1 is customer-specific and is not used in the standard system
  • STAT2    Employment Status
    • Status 2 relates to the employee’s employment relationship
  • STAT3    Special Payment Status
    • Status 3 controls an employee’s entitlement to special payment for automatic special payments within Payroll and Accounting

 

 

Sab125

Hi. I have been working as SAP Technical and functional for a decade. Through this blog, I am trying to share with you my experience. Hopefull, it makes your ways easier path ...Sab

Leave a Reply

Your email address will not be published. Required fields are marked *