cancel
Showing results for 
Search instead for 
Did you mean: 

Adding users to SRM org structure

0 Kudos

Experts

I have an ABAP function module that is created to add users to SRM org structure on mass basis.

I am looping at an internal table of user ids and calling function BBPU_CONVERT_SINGLE_SU01_USER to create the user and then calling BBP_UPDATE_ATTRIBUTES to add default attributes to the user.

However the process runs fine only for the first user - From second user onwards there is no entry created in BUT000, due to which the attributes addition part fails.

What is strange is that the Central person / employee is created for the second user onwards and they are visible in ppoma_bbp, but business partner for the employee is not created for second user onwards.

If I add multiple users via tcode users_gen then everything works fine.

Can somebody guide me to where I am going wrong

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi All

I finally resolved the issue by splitting the process in 2 parts - first step is to create all the users in one go and then add the attributes to each new user in second step.

I was trying to do both steps in one go - that is create a user and add attributes to it, but on debugging realized that commit work might be hindering the process.

After splitting the process the solution has worked fine.

Thanks all for your helpful suggestions.

Former Member
0 Kudos

Hi Giresh,

When you add one user to an org unit, the org unit gets locked for few seconds. Hence it wont allow you to add any other user in that time period.

So after every user u need to give a WAIT statement in your code.

Hope this will solve your problem.

Thanks

Smita Sahay

chetan_b
Active Contributor
0 Kudos

Check email address of users in SU01  and Address of org unit you assign to those users.

Regards,

Chetan

Former Member
0 Kudos

Hi Giresh,

Try with WAIT 20 SECONDS in between FMs.

Regards

Praveen