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: 

Implementation of Badi HRBAS00_GET_PROFL

morten_nielsen
Active Contributor
0 Kudos

Hi

Have any of you guys had any success in implementing Badi HRBAS00_GET_PROFL?

I have a customer who is migrating to the context solution in SAP HR (Using P_ORGINCON instead of P_ORGIN). At this customer we would like to use this BADi, in order to get the structural profile maintained in T77UA automatically.

Looking through the documentation and the example code it seems to be a quite straightforward procedure. But when debugging more thoroughly through the code I found that:

• The username passed to the badi is sy-uname, and not the name of the user changed.

• The role name isn’t passed to the method.

• The Badi isn’t called from SU01.

I could probably do some abap utilizing the Parameter id, in order to catch the role name, but if the badi isn’t called from SU01, it seems I’m left with the option to do a mass update whenever the UserCompare is executed. And in this case it’s just as easy creating a small report from scratch.

Regards

Morten Nielsen

1 ACCEPTED SOLUTION

former_member66268
Active Participant
0 Kudos

Hi Morten,

We had used this BADI in one of my earlier projects and it worked well. To answer your query -

• The username passed to the badi is sy-uname, and not the name of the user changed.

>>> It uses the Sy-uname which would be the login user name right? any issues on this? or my understanding is incorrect?

• The role name isn’t passed to the method.

>>> The role name (Standard authorization role) need to be determined inside the Method by your custom code. You need to build the code for finding the Authorization role by combining AGR_USERS and AGR_1251 table;

• The Badi isn’t called from SU01.

>>> not sure why you would need this. This BADI would be called only during run time

Also inside the method you would need to change the Outflag from the default inorder for this BADI to work.

Hope this clarifies. Try and let us know how it works

Regards

Chandra

1 REPLY 1

former_member66268
Active Participant
0 Kudos

Hi Morten,

We had used this BADI in one of my earlier projects and it worked well. To answer your query -

• The username passed to the badi is sy-uname, and not the name of the user changed.

>>> It uses the Sy-uname which would be the login user name right? any issues on this? or my understanding is incorrect?

• The role name isn’t passed to the method.

>>> The role name (Standard authorization role) need to be determined inside the Method by your custom code. You need to build the code for finding the Authorization role by combining AGR_USERS and AGR_1251 table;

• The Badi isn’t called from SU01.

>>> not sure why you would need this. This BADI would be called only during run time

Also inside the method you would need to change the Outflag from the default inorder for this BADI to work.

Hope this clarifies. Try and let us know how it works

Regards

Chandra