Section Access on multiple disjunct fields using Generic Keys
I'm struggling with the following task: I need to create a section access setup using OR combinations. I have gone through the complex authorization blog post and also the pdf on generic keys but I can't apply the info to my needs.
I have three SAP tables GLPCA, BSAD and VBRP.
GLPCA and VBRP both have two fields called PRCTR (Profitcenter) and VKGRP (SalesGroup). VKGRP represents the individual user on where I want to apply the "most basic" section access.
The problem is that I need to lookup discount values for the VKGRP - but in GLPCA these are booked on a standard PRCTR (3000 or DUMMY) and also don't contain the VKGRP.
Using BSAD as a lookup-table I can retrieve the discount values from the VBRP table with the REFDOCNR. In VBRP I then have the correct PRCTR and VKGRP for all discount values.
Applying section access only on the VKGRP of GLPCA will make the discount values disappear so now my best guess is to create a
disjunction between GLPCA.VKGRP and VBRP.VKGRP.
So if I link the NTNAME johndoe to VKGRP 508 he should be able to see all the PRCTRs (and thus including the discount values) where at least one of the two VKGRPs is assigned to 508.
This would be the most basic section access I need.
Additionally some users are not only restricted by VKGRP but also by GLPCA.RACCT (Account number).
And then I will also have users that are allowed to see everything but only based on a defined set of PRCTRs (meaning PRCTRs of one or both tables).