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: 

Replicating authorization checks using SAP provided function calls

Former Member
0 Kudos

All:

Due to a business scenario, we need to validate if a user has access to execute transaction MBST. We need to check the security of the user in question before they issue other material movements in the system.

I cannot determine if the function modules AUTH_CHECK_TCODE and/or AUTHORITY_CHECK_TCODE will do the same for me. Or will the above functions only do half the job?

Thanks,

Ahmed

6 REPLIES 6

Former Member
0 Kudos

This is not direct answer. But if none of mentioned function modules works fine you can do it "manually" in ABAP code

using tables usr02, agr_users, agr_tcodes, agr_define ,agr_1252 and eventualy tstsc and usvart for descriptions in required language.

BR, Jacek

0 Kudos

Jacek,

Thanks for the info.

However, I am trying to refrain myself from writing a custom validation like you advised. I was also aware of the tables although you did help in adding one more table I should look at.

But getting back to the original question, is their any "standard" call that I could execute to determine if a user can execute transaction MBST.

Your thoughts are appreciated.

Ahmed

0 Kudos

Simply do AUTHORITY_CHECK on S_TCODE object.

0 Kudos

Srinivas,

I had thought about using the Authority-check as SAP prefers to use this across most programs. However, as I debugged thru MBST I noticed SAP does not issue a authority check on S_TCODE but rather it was using the function modules I had mentioned in my first request. SAP further proceeded to issue authority checks against objects (M_MSEG_WWA) and (M_MSEG_WWE, M_MSEG_WWF, or M_MSEG_WWA) depending on the material document that was being canceled.

Just thought I would mention it, if somebody searches threw the forum for a similar need.

Thanks,

Ahmed

Former Member
0 Kudos

I don't know how you are planning to do this. Material movements can be done by users using several tcodes. How are you planning to check in each of those transactions to see if the user has MBST access or not? These are standard transactions.

So what exactly you intend to find out? Are you looking for a report that shows all the users who have access different material movement transactions but not MBST or you actually want to do an authority check in each of these transactions? The second one is not possible. You can only do a report and pass it on to basis so that they can include MBST access to all those users in your report.

Srinivas

former_member181966
Active Contributor
0 Kudos

HI

You can find bunch of reports in tr.SUIM ..

also check the post

Thanks