Exposing employee master data from SAP HR system using Web Service

SAP HANASAPSAP Basis

In a general scenario, when you have ICF configured you can expose SAP system business objects and jobs via BAPI. It is very easy to create and expose BAPI as a web service. As there are only few web services for SAP HR module in SAP system however you can transform a BAPI or ABAP function into a web service. If there is no such function you can create one easily.

To find details about BAPI from Function module, use T-Code: SE37 and enter Functional module name for SAP HR module. Below is the list of existing HR function modules in SAP system.

1HR_ENTRY_DATES
Determine the entry date of an employee
2HR_PT_HIRE_FIRE
Get Employees Hire date and Exit date
3CU_READ_RGDIR
Read Payroll cluster Results data for an employee
4CD_READ_LAST
Get the latest record sequence number in a cluster directory internal table
5PYXX_READ_PAYROLL_RESULT
Import the Complete Payroll result
6PYXX_GET_EVALUATION_PERIODS
Import the payroll results generated in a given In-period
7HRCA_READ_BANK_ADDRESS_2
Read bank name and other details
8RP_FILL_WAGE_TYPE_TABLE_EXT
Read employees all basic pay details including indirect evaluation.
9CONVERT_TO_LOCAL_CURRENCY
Convert Foreign currency to Local currency amount
10HR_GET_TOTAL_AMOUNT_P0008
Get the total amount in Infotype 8 basic pay details.
11HR_TMW_GET_EMPLOYEE_NAME
Get the employee Name
12RH_GET_LEADER
Get the Manager
13HR_GET_PAYROLL_RESULTS
Imports the current payroll results
14REUSE_ALV_GRID_DISPLAY
Alv Grid type output
15RH_GET_PERSON_FROM_USER
Get the assignment of the user to a person
16HR_READ_INFOTYPE
Read the infotype data
17HR_COUNTRYGROUPING_GET
Get an employee Country grouping details
18HR_MAINTAIN_MASTERDATA
Update, Insert HR master data.
19BAPI_EMPLOYEE_ENEQUE
Lock the employee number for maintenance
20BAPI_EMPLOYEE_DEQUE
Unlock the employee number.
21HR_INFOTYPE_OPERATION
HR master data maintenance
22RP_READ_ALL_TIME_ITY
Read Time infotype data.
23HR_TIME_RESULTS_GET
Read time infotype data
24RH_READ_INFTY_1000
Returns the relevant records from the Infotype 1000 for OM object types
25HR_PAD_HIRE_EMPLOYEE
To hire an employee with any infotype data and cost assignment data in the background


You can navigate to module specific Functions in Transaction SE 37 by clicking on SAP Applications.

Select any of the function module and click on Display. You will be navigated to screen with all the details about that BAPI.

Creating Web Service using Function Group:

Run T-code: SE80 -> Enter the Function Group in the Function Group Area

You can also refer to below link for creating and exposing BAPI as Web Service:

https://blogs.sap.com/2006/09/12/creating-and-exposing-bapi-as-web-service-and-using-it-in-web-dynpro/

raja
Published on 20-Dec-2017 10:39:37
Advertisements