I am trying to implement a custom access control for a customer and ran in to an issue.
They want to build a Design studio dashboard to track employee utilization in various pay periods. I have a Calculation view with input parameters to get the utilization percentages. (IP is needed because they always do a rolling selection of 2 pay periods). This utilization is used at Center, Office, Division and Branch Levels. In my graphical calculation view, results look good.
Now, they want to restrict the access to the data at various levels (such Center, Office etc...). They don't have BO users mapped to Hana users. Instead they have schema level access (which is what I use for development). In this scenario, I chose to create a custom table with users and their level of access, and use this in a scripted view to filter the data. It is done with a behind the scene passing of BO user ID from Design studio to Hana to look up the user's access level in the scripted view.
When I do this, I see the percentage calculations summing up in scripted view. I tried creating the calculations in SQL, but that doesn't seem to work.
For example, if I am getting 101 for an Office with 8 employees in my graphical view, I am seeing 808 in the scripted view.
Since we don't have the keep flag in scripted views, I can't adjust the aggregation in this case.
If there are better solution tot the problem that I explained above, I will be more than happy to try that.
I have taken the liberty to tag a few people whom I look up to when in trouble. Apologies for the inconvenience.