Application Development and Automation 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: 
Read only

NEED HELP IN PROFILES

Former Member
0 Likes
768

HI,

in su01 we have user dummy that have lot of duplicates profiles,

how cam i build program or process that can delete his duplicates profiles?

i reward

Regards

1 ACCEPTED SOLUTION
Read only

Rashid_Javed
Contributor
0 Likes
713

Hi

Are you talking about "Profiles" or "Roles" in SU01 ?

Because if the issue is duplicate Roles, that you can resolve the issue as following

1: In your abap program, read from table AGR_USERS against a given user name. This will return all roles assigned to a user.

2: select the roles you want to unassign from the user. Lets say you put these in internat table itab.

3: use function PRGN_DELETE_USER_ASSIGNMENT to unassign these roles from user master as following

loop at itab.

call function 'PRGN_DELETE_USER_ASSIGNMENT'

exporting

user_name = itab-userid

activity_group = itab-role

from_date = itab-from

to_date = itab-tod

exceptions

actgroup_not_authorized = 1

actgroup_not_existing = 2

actgroup_enqueued = 3

others = 4.

if sy-subrc ne 0.

          • give your error message

endif.

endloop.

hope this helps.

Edited by: Rashid Javed on Jul 2, 2008 11:33 AM

RJv

Hi

Are you talking about "Profiles" or "Roles" in SU01 ?

Because if the issue is duplicate Roles, that you can resolve the issue as following

1: In your abap program, read from table AGR_USERS against a given user name. This will return all roles assigned to a user.

2: select the roles you want to unassign from the user. Lets say you put these in internat table itab.

3: use function PRGN_DELETE_USER_ASSIGNMENT to unassign these roles from user master as following

loop at itab.

call function 'PRGN_DELETE_USER_ASSIGNMENT'

exporting

user_name = itab-userid

activity_group = itab-role

from_date = itab-from

to_date = itab-tod

exceptions

actgroup_not_authorized = 1

actgroup_not_existing = 2

actgroup_enqueued = 3

others = 4.

if sy-subrc ne 0.

          • give your error message

endif.

endloop.

hope this helps.

Edited by: Rashid Javed on Jul 2, 2008 11:33 AM

5 REPLIES 5
Read only

Former Member
0 Likes
713

Hi Experts,

any idea how can i solve it?

Regards

Read only

Rashid_Javed
Contributor
0 Likes
714

Hi

Are you talking about "Profiles" or "Roles" in SU01 ?

Because if the issue is duplicate Roles, that you can resolve the issue as following

1: In your abap program, read from table AGR_USERS against a given user name. This will return all roles assigned to a user.

2: select the roles you want to unassign from the user. Lets say you put these in internat table itab.

3: use function PRGN_DELETE_USER_ASSIGNMENT to unassign these roles from user master as following

loop at itab.

call function 'PRGN_DELETE_USER_ASSIGNMENT'

exporting

user_name = itab-userid

activity_group = itab-role

from_date = itab-from

to_date = itab-tod

exceptions

actgroup_not_authorized = 1

actgroup_not_existing = 2

actgroup_enqueued = 3

others = 4.

if sy-subrc ne 0.

          • give your error message

endif.

endloop.

hope this helps.

Edited by: Rashid Javed on Jul 2, 2008 11:33 AM

RJv
Read only

0 Likes
713

Hi,

thanks but I don't wont to delete duplicates rols ,

i wont to delete duplicates profiles.

Regards

Read only

0 Likes
713

Hi,

thanks but I don't wont to delete duplicates rols ,

i wont to delete duplicates profiles.

Regards

Read only

0 Likes
713

Hmm

Well haven't personally worked on such problem but may be the following can help.

User - profile relationship is in table UST04.

profile - role relationship is in table AGR_1016B

Chedck the folloiwng FMs. May be helpful

PRGN_AUTH_PROFILES_ASSIGN

PRGN_AUTH_PROFILES_DELETE

RJv