10-29-2015 5:46 AM
Hi SAP Techies,
Issue: I need to get the sales area assigned to the user (login) but when I checked in the authorizations, found that the distribution channel and division are having asterisk (like 10*, 200*).
Please guide.
Do we have any bapi to get user specific sales area assigned to that user.
Your valuable reply is most awaited.
Thanks in advance
--Pavan G
10-29-2015 9:05 AM
Usually you select the whole customizing table (here for the three fields of sales area -> TVTA) and execute AUTHORITY-CHECK in a loop.
Regards,
Raymond
10-29-2015 9:05 AM
Usually you select the whole customizing table (here for the three fields of sales area -> TVTA) and execute AUTHORITY-CHECK in a loop.
Regards,
Raymond
10-30-2015 5:18 AM
Thanks for comment,
I had already carried out the looping and authority check logic, but issue is for '*' we have to get all the data.
Regards,
Pavan G
10-30-2015 7:07 AM
Then build some select range for the three keys of TVTA (VKORG; VTWEG; SPART) from current user authorizations.
Get those from SUSR_USER_AUTH_FOR_OBJ_GET and every authorization object that you want to check or that use those values (table TOBJ) (depends on actual requirement)
Regards,
Raymond
.
10-29-2015 10:40 AM
You could use FM SUSR_USER_AUTH_FOR_OBJ_GET to get the authorization details of an user and then do a select from table TVTA to convert the "10*" etc values to actual values.
R
10-29-2015 10:52 AM
Hi,
If there should be a single sales area assigned to a user , you can use the Parameters tab in user specific data using SU01 and assign that to user, you can get this data from Table USR05.
Hope this helps.