04-22-2009 12:13 PM
In my code i have a requirement to enter sales order and Stock transport order. However i want that a WM resource should not be allowed to enter sales order and an SD resouce should not be allowed to enter stock tranpsort order. Please suggest.
04-22-2009 12:14 PM
Hi,
You can create an authorisation object using T code SU21 and assign aothorized users to this object and check the authority of users in your code .
Write AUTHORITY-CHECK in ABAP editor and press F1 to get syntax details for auth. check for a user.
04-22-2009 12:18 PM
Hi,
create authorization obj in SU21 with the field as USER.
now in your code check the obj and that solves your requirement.
04-22-2009 12:25 PM
Hi,
Another way to solve this is create a Z table with field user name and Resource type and compare the user id ( sy-uname) with the Z table and allow accordingly.
In production environment controlling authorization in this approch is much easier.
Hope this helps.
Regards
Bikas
04-22-2009 2:44 PM
is there some way where i can determine whether the user is from WM or SD based on his roles? Would be great if i can make use of existing tables and search for roles
04-22-2009 2:47 PM
04-22-2009 5:45 PM
Hi,
as you say u want to now based on roles...u can ask ur basis person to assign the new role only to SD ppl and not to WM ppl so that only SD ppl can execute the report...this is more of authorization ask your basis team they should be able to solve this in no time