03-12-2007 12:58 PM
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 isnt passed to the method.
The Badi isnt called from SU01.
I could probably do some abap utilizing the Parameter id, in order to catch the role name, but if the badi isnt called from SU01, it seems Im left with the option to do a mass update whenever the UserCompare is executed. And in this case its just as easy creating a small report from scratch.
Regards
Morten Nielsen
04-19-2007 5:59 AM
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 isnt 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 isnt 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
04-19-2007 5:59 AM
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 isnt 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 isnt 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