Application Development 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: 

Bapi for creation of employee(pernr)?

Former Member
0 Kudos

Hi,

Is there any Bapi with which we can create an employee(Pernr)?

We have BAPI_APPLICANT_CREATE for applicant creation.

Thanks in advance,

RSS.

4 REPLIES 4

Former Member
0 Kudos

You can use HR_MAINTAIN_MASTERDATA.

with NO_EXISTENCE_CHECK = 'X'

0 Kudos

Hi,

Thanks for the reply. But my requirement is I want to upload the employee information from .net to sap.

So I need some bapi's with which I need to upload hte following:

1) I need to hire an employee in SAP which is nothig but creation of an employee in SAP (Using PA40). And then his personal data etc details. So first of all an employee number needs to be generated. But for that I requuire bapi to hire that employee. I have bapis for the other things if I have employee number. Once i get that i can use the same pernr and update the remaining details.

Hope am clear now. Please let me know if you require any additional information.

RSS.

Anyway I will get back to you on this by tomorrow by checkinng HR_MAINTAIN_MASTERDATA function module. Currently i dont have SAP gui.

Edited by: RSS on May 29, 2008 2:06 PM

0 Kudos

You can use HR_MAINTAIN_MASTERDATA by passing all the infotypes in one go(in proposed values).

CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'

EXPORTING

PERNR = NUMBER

ACTIO = 'INS'

TCLAS = 'A'

BEGDA = VALIDITYBEGIN

ENDDA = VALIDITYEND

OBJPS = OBJECTID

SEQNR = RECORDNUMBER

SPRPS = LOCKINDICATOR

SUBTY = SUBTYPE

WERKS = WERKS

PERSG = PERSG

PERSK = PERSK

LUW_MODE = LUW_MODE

DIALOG_MODE = '0'

NO_EXISTENCE_CHECK = 'X'

NO_ENQUEUE = 'X'

IMPORTING

RETURN1 = RETURN

TABLES

PROPOSED_VALUES = PROPOSED_VALUES

MODIFIED_KEYS = MODIFIED_KEYS

EXCEPTIONS

OTHERS = 0.

OR you can also use this function module to create the employee by passing only the require infotypes like IT0000 and IT0001.

0 Kudos

Hi Aparna,

But this is not a Bapi or rfc function module so that I can call from .net.

I need to call the function module from .net so it should be either Bapi or rfc.

Regards,

RSS.