Categories: ABAP TutorialsSAP HR

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

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

Related Post

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.?

<pre class="">CALL FUNCTION 'HR_PT_CHECK_EMPLOYEE_ACTIVE' "
  EXPORTING
    endda =                     " p0001-endda   End Date
    begda =                     " p0001-begda   Start Date
  TABLES
    ab =                        " pc20i         Cluster RD/B2: Table AB
    wpbp =                      " pc205         Payroll Results: Work Center/Basic Pay
    .  "  HR_PT_CHECK_EMPLOYEE_ACTIVE</pre>

SAP Check Employee Existence Table

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

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

 

 

Share
Published by
John
Tags: Employee

Recent Posts

The Most Important SAP ISU Tables

SAP ISU Tables for Technical master data, for Billing Master Data, Billing and invoicing Tables?…

December 22, 2020

SAP Fiori 3 UX and Design of SAP Fiori Apps for SAP S/4HANA, SAP TechEd Lecture

SAP Fiori 3 UX and Design of SAP Fiori Apps for SAP S/4HANA, SAP TechEd…

November 18, 2020

The Main SAP Dunning Transaction Codes

Dunning is the business practice of informing a customer of past due payment. Dunning letters…

November 28, 2019

SAP Accounts Payable Tcodes & Accounts Receivable Tcodes ( SAP AP Tcodes & SAP AR Tcodes)

SAP AP Tcodes & SAP AR Tcodes: House Banks Tcodes, Advance Payments or Down Payments,…

August 1, 2019

The Most Important SAP Payment Terms Tables (ZTERM, Text…)

What are the main SAP Payment Terms Tables ? What are the related Tables in…

October 21, 2018

The most Important SAP Work Center Tables in SAP PP

Work center consists of master data related to routing of products. It contains data related…

October 21, 2018