Skip to Content
-1

ABAP Selection Options and V_VBAK_VKO authorization

Aug 31, 2017 at 01:46 PM

136

avatar image
Former Member

HI ,

I need advice from abapers :

when i create report reading from VBRK/VBRP and and want restrict authorization to Sales Area V_VBAK_VKO (auth object) and i have selection options for vkorg/vtweg/spart how i can check authorization for combination those 3 (sales area) and later run SELECT only for authorized sales area?

thx a lot for help in advance.

sample code would be very welcome.

BR Rafal

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Raymond Giuseppi
Aug 31, 2017 at 02:05 PM
0

You could select data from table TVTA in an internal table for the selection options. Execute authority-check statement for each record and remove the records not allowed. From remaining records you should try to either build a dynamic string for the WHERE clause or build some new select-options to use in a following query.

Share
10 |10000 characters needed characters left characters exceeded
Jelena Perfiljeva
Aug 31, 2017 at 09:31 PM
0

V_VBAK_VKO is for sales documents, I believe the right object for billing is V_VBRK_VKO.

Personally, I'm not a big fan of the "quietly hide unauthorized content" option as this always leads to "why am I not seeing this invoice on the list?!!!" tickets. In our system, we just do the authorization check on the selection screen and throw an error if the users try to enter a Sales Org they have no authorization for. For this check we use the approach similar to what Raymond suggested (config table as a reference).

Of course, the hiding approach might work better in some scenarios, I'm not saying my way is the best. Just another option.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Sep 16, 2017 at 07:30 AM
0

thank you for answer , it s quite easy in we talk about sale organization but in case selection-options and sales area it is quite hard.

option for removing rows is quite slow i guess as i must read all records first in select and remove them (performance)

option for checking authorization on selection options is ok but how i remove proper sales area ? i can remove Sales organization , Distribution Channel or Division , but if some has authorization to Sales Area A1/B1/C1 and A1/B2/C1 and not to C2/B2/C1 so i can not remove B2 from list.

now some good ABAPER advised me to do authorization on sales org level and delete entry later for DC and Division.

in S/4HANA i have option in new ALV IDA to go for ROW authorization during select from VIEW or TABLE will try to test that but it is not working from temp table.

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Sep 17, 2017 at 01:29 PM
0
Share
10 |10000 characters needed characters left characters exceeded