Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Employee BAPI

Former Member
0 Likes
763

Hi everyone,

Trying to call the Bapi_Employee_Getdata to search for employees.

One of the fields it asks for is a date. We're passing in the current date.

oProxy.Bapi_Employee_Getdata(Authority_Check:="X", _

Blding_No:="", _

Costcenter:="", _

Employee_Id:=strID, _

Date:="2009/02/05", _

Extension:="", _

Fst_Name_K:="", _

Fst_Name_R:="", _

Fstname_M:=strFirstName, _

Jobtxt:="", _

Jobtxt_Lg:="", _

Lastname_M:=strLastName, _

Liplate_No:="", _

Lst_Name_K:="", _

Lst_Name_R:="", _

Orgtxt:="", _

Orgtxt_Lg:="", _

Phone_No:="", _

Postxt:="", _

Postxt_Lg:="", _

Readdb:="", _

Room_No:="", _

Userid:="", _

myReturn:=oBAPIRETURN, _

Archivelink:=oArchiveLink, _

Communication:=oCommunication, _

Internal_Control:=oInternal_Control, _

Org_Assignment:=oBAPIP0001BTable, _

Personal_Data:=oPersonal_Data)

oProxy.Connection.Close()

However the issue is that it does not return employees who have been sacked - only current employees.

We've found that when you put the date in as - say - one year ago it does return these employees. However it doesn't return any new starters since that date.

What we need is a way to search for all employees, current and leavers.

Is there any way we can do it?

2 REPLIES 2
Read only

0 Likes
679

any luck here

Read only

0 Likes
679

Hi,

If I recall I had to use the FM :

CALL FUNCTION 'RH_DATA_COLLECTOR_ORGCHART'
     EXPORTING
       plvar           = '01'
       root_otype      = 'O'
       root_objid      = wa_org_id
       keydate         = wa_date
       scenario        = 'MDT1'
       wegid           = 'O-S-P'
       tdepth          = 0
     TABLES
       actor_tab       = actor_tab
       structural_data = struc_tab
       objects_data    = objec_tab
     EXCEPTIONS
       no_plvar_found  = 1
       root_not_found  = 2
       OTHERS          = 3.



Based on an Org ID. This retrurns everything O Org unit S Position and P people.

Just search on the objec_tab table returned :


LOOP AT objec_tab WHERE otype = 'P'.    " People only


This will bring back EVERYONE even past leavers




Andy