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: 

authority check for sales order and stock transport order

Former Member
0 Kudos

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.

6 REPLIES 6

Former Member
0 Kudos

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.

0 Kudos

Hi,

create authorization obj in SU21 with the field as USER.

now in your code check the obj and that solves your requirement.

former_member182485
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

AGR_* tables might be a good fit for your requirement.

0 Kudos

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