‎2015 Jan 14 7:16 AM
Hi everybody,
One of my client has requirement that....
say if we have authority object on sales organization.....he want to read the what sales organization he is authorized from the authority object and fill
the sale organization field automatically.
please let me know if any FMs are available.... i have searched the net but could get FMs that can check whether the user is having authorization or not
but couldn't get any FMs that can read the contents of the Authority Object.
Thanks
Bhargava
‎2015 Jan 14 8:32 AM
Get the list of sales organization from the value table. Loop at each entry and find whether user is authorized using the authority check command. if yes, collect it into internal table and use it as per your need.
‎2015 Jan 14 8:40 AM
Hi,
normally SPA/GPA VKO will be used for this. Each user can maintain his VKO parameter in SU3.
Regards,
Klaus
‎2015 Jan 14 8:42 AM
‎2015 Jan 14 8:56 AM
Hi Bhargava,
You can do something like this. For billing auth. object for sales org is V_VBRK_VKO.
lt_tvko TYPE STANDARD TABLE OF tvko,
ls_tvko TYPE tvko.
select *
from tvko
into TABLE lt_tvko.
loop at lt_tvko INTO ls_tvko.
AUTHORITY-CHECK OBJECT 'V_VBRK_VKO'
ID 'VKORG' FIELD ls_tvko-vkorg
ID 'ACTVT' FIELD '03' .
IF sy-subrc = 0.
* consider this sales org for further processing
ELSE.
* Remove sales organization as user dont have authorization to display
ENDIF.
endloop.
Thanks
Deependra