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

BAPI_PERSDATA_CREATE personnel number

Former Member
0 Likes
2,182

Halo!

I am new on SAP(R/3 4.70) and would be glad if someone could help me how to use this BAPI.

I would like to create new person with this component.

So my question is How to assign or create new personnel number and after that use it in BAPI_PERSDATA_CREATE.

I tried to create personnel data with personnel number 00000000 and it was successfully added in PA0002 table. But at the end I could see this persons data only with transaction PA10(Personnel File), and not with PA20(Display). So, I came to conclusion that I have to add some information to other PA**** tables, but don't know how.

Thank you in advance.

Mihail

1 ACCEPTED SOLUTION
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
1,675

Hi Mihail

I did not use the FM you mentioned before. But there should be some data at least at PA0003, PA0000 (actions) and PA0001 (organizational assignment).

Still it seems to me that it is weird the personnel can be viewed from PA10 but not PA20 .

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

8 REPLIES 8
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
1,676

Hi Mihail

I did not use the FM you mentioned before. But there should be some data at least at PA0003, PA0000 (actions) and PA0001 (organizational assignment).

Still it seems to me that it is weird the personnel can be viewed from PA10 but not PA20 .

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Read only

0 Likes
1,675

Hi Serdar,

I looked in tables PA0000, PA0001, PA0003, but I didn't find personnel number (PNo) 000000. I found it only in PA0002.

When I use transaction PA10, I get pop-up "Table PA0002 contains an entry for personnel number 00000000". After confirmation I get basic personnel information from PA0002.

I guess that information contained in PA0002 is not enough to display data in PA20.

I think that I have to do something (but don't know what) to create or assign PNo in the tables you mentioned.

Best Regards,

Mihail.

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
1,675

Hi Mihail

It is weird that there is a record in PA0002 with personel number '00000000'. Personnel existence check is mainly done looking the table <b>PA0003</b>.

Alternatively, you can use the FM <b>"HR_INFOTYPE_OPERATION"</b> or the BO <b>"HRMasterDataReplica"</b>.

For more information on these, check out following threads:

1.

2.

3.

4.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Read only

0 Likes
1,675

Hallo, Serdar!

First, I would like to thank you for your answer.

I forgot to mention that I will use this modules from Java application, what means that I am limited to BAPI-s (at list I think so).

I guess the only problem is how to create new employee record with new personnel number that is also stored in other tables than PA0002.

According to you, I guess that record in PA0003 is essential for reading personal information using transaction PA20.

If you have any ideas I would be glad i you could share them with me.

Best regards,

Mihail

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
1,675

Hi again

For HR objects (comprising also PD) you can use the Business Object <b>"HRMasterDataReplica"</b>. It has a class method as <b>"SaveReplicaMultiple"</b> where you can pass your data to the interface.

You fill <b>"BAPIHROBJ" and "BAPIHRINF"</b> mainly and other infotype-related parameters. e.g. for infotype 1000 <b>"PdObject"</b> (structure like p1000) and for 1001 <b>"PdObjectRelationships"</b> (structure like p1001).

These are BO names, you can use the transaction code <b>"BAPI"</b> for more information.

The BAPI for this method is discussed also at

Message was edited by: Serdar Simsekler

Read only

0 Likes
1,675

Hi, Sedar

Thank you wry much for your help.

What you described me, is a little bit complicated, but it looks like it is the only way.

Because I am not familiar with ABAP programming, I will try to do it in the future.

Best regards,

Mihail

Read only

wenshan_liu
Product and Topic Expert
Product and Topic Expert
0 Likes
1,675

First, you shouldn't use personnel number 00000000. It's not a valid number. Second, I don't think there is a BAPI existing for creating a new person. Hiring an employee is a complicated process in HR. usually you need to run PA40 in R/3 to hire an employee.

Read only

0 Likes
1,675

Hi, Wnshan!

Thank you too for your answer, it helped me to reschedule my task for later.

Best regards,

Mihail