Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8078

Re: Is it possible to use standard authorization objects in Z-reports ?

$
0
0

Hi

 

You can use your code in the AT SELECTION-SCREEN event, you set the error only if any data is ok:

 

select-options s_vkorg for tvko-vkorg.

 

data: r_vkorg type range of tvko-vkorg,

       l_vkorg like line of r_vkorg.

data: t_tvko  type standard table of tvko with header line.

 

at selection-screen.

 

   free r_vkorg.

 

   select * into table t_tvko

     from tvko

       where vkorg in s_vkorg.

 

   loop at t_tvko.

     authority-check object 'V_VBAK_VKO'

              id 'VKORG' field t_tvko-vkorg

              id 'VTWEG' dummy

              id 'SPART' dummy

              id 'ACTVT' field '03'.

     if sy-subrc = 0.

       l_vkorg(3) = 'IEQ'.

       l_vkorg-low = t_tvko-vkorg.

       append l_vkorg to r_vkorg.

     endif.

   endloop.

 

   if r_vkorg is initial.

* -----> User not authorizzated for any sales org.

   endif.


In your selection you use the range instead of select-option


Max


Viewing all articles
Browse latest Browse all 8078

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>