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: 

How to know "pernr" after creation of employee with HR_MAINTAIN_MASTERDATA

Former Member
0 Kudos

Hello,

Anybody any idea how you can know the pernr of the employee you created with HR_MAINTAIN_MASTERDATA?

Problem I am facing:

I create a new employee using HR_MAINTAIN_MASTERDATA.

As I do not have all information required yet, I only update/insert IT0000.

(otherwise the program asks me to "Fill in all required fields")

Then I want to fill up the other IT with HR_INFOTYPE_OPERATION, but I don't know the number that was created.

Can anybody help me?

Thanks.

5 REPLIES 5

former_member194669
Active Contributor
0 Kudos

Have you checked the exporting parameter from the fm call?


EXPORTING
*"             VALUE(RETURN) LIKE  BAPIRETURN STRUCTURE  BAPIRETURN
*"             VALUE(RETURN1) LIKE  BAPIRETURN1 STRUCTURE  BAPIRETURN1
*"             VALUE(HR_RETURN) LIKE  HRHRMM_MSG STRUCTURE  HRHRMM_MSG

Former Member
0 Kudos

Hi Ilse Van Loocke

output table MODIFIED_KEYS will have the employee number that was generated along with the Infotypes that were created.

With Regards

Balasubramanian

Former Member
0 Kudos

I've just started ABAP Developping and I find it nice to know that there are people like you to help me

Thanks a million.

Former Member
0 Kudos

I checked the Modified_keys table and the pernr there is '00000000' instead of the one created '00000040' :'(

Any ideas?

Former Member
0 Kudos

I used NUMBER_GET_NEXT and then substracted 1...

Not the best solution, but it works...