04-11-2006 5:16 PM
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
04-11-2006 5:39 PM
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
04-11-2006 6:57 PM
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
04-11-2006 7:45 PM
04-12-2006 4:20 PM
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
04-11-2006 5:44 PM
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
04-11-2006 5:47 PM