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: 

SU01 role add versus role change inside customer exit Z_USERS_TRANSFER

Former Member
0 Kudos

We're using customer exit Z_USERS_TRANSFER (reference note 367660) to do some custom code after a SU01 save. The "changed" roles are transferred through an internal table and I'm also querying the table AGR_USERS to get the userid's "current" roles into an internal table. I also know the SU01 mode (create, change or delete).

The problem is being able to differentiate between an added role or a changed role while in SU01 change mode. For example, if I add role ABC the changed_role_itab has role ABC and the current_role_itab has role ABC. If I then change role ABC to have a valid from date of 5/19/2007, both of the internal tables will have role ABC with a valid from date of 5/19/2007.

I thought about looking at change documents but that may be too complicated. Any suggestions?

Thanks,

Brad

2 REPLIES 2

Former Member
0 Kudos

Hi Brad,

I have a workaround for you. In the user exit do as following...

Delcare a internal table withe structure AGR_DEFINE

example : data: t_agr_define type agr_define occurs 0 with header line.

now read the role information from the database table ( This would have old values since you have not changed yet inSU01).

select * from agr_fine into t_agr_define where agr_name = <rolename.

Now you will have old value to be compared with another internal table current_role_itab.

Reward points if its helpful.

Former Member
0 Kudos

Nallasamy,

Thanks for the reply, but this customer exit is called after the database is updated.

-Brad