Quantcast
Channel: SCN : Popular Discussions - SAP Business ByDesign
Viewing all articles
Browse latest Browse all 2194

Populating an OWL with dynamically generated queries

$
0
0

Hi,

 

for a collection of one BO named contract I need a dynamic filtering.

 

The filtering is based on a rights BO that has a node of associated employees and other elements that hold the permissions (for instance a cost centre, the company,or the type of contract).


When opening a floorplan the OWL should only show these contracts the logged user is permitted to read or edit.


An example:


Actual user "A" is logged in. Two rights objects reference this user in their employees node. As a result, he has permission to read/write contract objects having cost centre "B"  and "C" and contract types "D" and "E". All other elements of the collection of contracts should not be listed to user "A" in the OWL.

 


So, I could build my query dynamically in ABSL based on a predefined query using the statement QueryParameters.ADD(...) - for each permission with the related attribute of a contract - and get the collection of contract BOs the user has permission to.

 

Is it possible to build and use such a dynamic query as an initial query for a OWL? Yet, I know that only QueryByElements or user defined static queries with a fixed number of (databound) parameters can act as a default query. In my case, the number of query parameters can change, dependent on how many rights BOs the user is referenced by.

 

What would you propose as the best way to populate an OWL regarding performance and the needs of building such a query dynamically?

 

 

Thanks in advance!

 

Markus


Viewing all articles
Browse latest Browse all 2194

Trending Articles