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: 

need to fetch a list of t-codes by user

Former Member
0 Kudos

Hi All,

i have a scenerio were i need to fetch the list of t-codes by user ids. i checked all SDN posts but did not find the correct answer. i need to find the list for around 1000 users and so this is not possible by SUIM. do we have any Table or T-code which can give the list in bleow formate.

user1 tcode1

tcode2

tcode3

u2026.

User2 tcode1

Tcode2

u2026

thanks in advance....

Edited by: mayank jain on May 17, 2011 5:01 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Mayank,

We can extract the User --> Assigned list of roles from AGR_USERS and you can bump the list of roles to AGR_TCODES and extract the list of assigned tcodes to each role. Try managing the data in Excel with Pivot tables to see if you arrive at the required output format. Hope it helps.

Rgds,

Sri

10 REPLIES 10

Former Member
0 Kudos

Hi Mayank

Looking at your previous posts you seem to be from an ABAP background? Have you tried the AGR* tables - there are two that would give you the answer once linked AGR_USER & AGR_1251.

There are probably other ways to do this if you can't get this from SUIM but this way is easy enough - just restrict by field or object for S_TCODE (or TCD if you want to see all the P_TCODES etc).

Cheers

David

Former Member
0 Kudos

from personal experience the only clean way to fo this is pull the data from ST03, obviously you would have to do the users month by month.

former_member185031
Active Contributor
0 Kudos

If the Audit log is enabled on your System then you can get it through SM20 also by entering the user name one by one. A lot of manual work required.

Regards.

Subhash

Former Member
0 Kudos

Hi Mayank

Just to clarify - do you want 1000 users and their assigned transactions (maybe/maybe not executable) or actually used transactions only please?

Regards

David

Former Member
0 Kudos

Hi All,

first thanks for your replies.

i am currently working for security and have very limited access. i dont have access to ST03/SM20. also in my project tabel 'AGR_USER ' is not active and other tabel is not that helpfull.

i need a list of tcodes for which users have access to or i can say executable tcodes. like we fetch list of tcodes in SUIM->transaction->by user. this is one option but not possible for 1000 users. also i can not create new program. is there any way to do by basic security t-codes?

0 Kudos

Hi Mayank

I may be wrong on the AGR_USER table - no access and working from memory so try searching AGR_U*. Pull the list of roles per user from the resulting table and download, run AGR_1251 populated with the list of roles and restrict by object S_TCODE (simplest) and download that and then marry both together using either vlookup or access DB.

As for a standard SAP transaction - I don't know of one but let's wait to see..

There are always lots of ways to 'skin a cat'.

Cheers

David

P.S. The list you eventually return doesn't necessarily mean the user can actually run all of them successfully.

Former Member
0 Kudos

Could you not ask someone to write a query or report? One of the benefits of being in security is there is always a developer who thinks they owe you a favour

tbh I would be very careful with this information, depending on the system the users could have access to many more tcodes than they will ever have actually used,

Former Member
0 Kudos

Hi Mayank,

We can extract the User --> Assigned list of roles from AGR_USERS and you can bump the list of roles to AGR_TCODES and extract the list of assigned tcodes to each role. Try managing the data in Excel with Pivot tables to see if you arrive at the required output format. Hope it helps.

Rgds,

Sri

0 Kudos

Hi Sri

Thanks for clearing up the AGR_USERS table - I couldn't think of the correct one but the AGR_TCODES is not enough as it only returns transactions on the menu and not available to the user (to whatever degree).

Regards

David

Former Member
0 Kudos

thanks David and Sri,

i managed to fetch the list of users with roles and roles with tcods. now the only problem os to merge them. ill try it... thanks again to all for help..