如何将cds元素与ABAP函数的返回值进行比较?
例如:员工被分配到公司,公司有来自客户的订单。 这些订单显示在表格中,员工只能看到他们所在公司的订单。
如果员工A在B公司工作,那么角色将是这样的:
grant select on ConsumptionViewName where company = ‚B‘;我现在想要使这个硬编码的'B'动态,并且有一个ABAP帮助函数,它返回应该使用的雇员的雇主。 没有任何授权对象有公司的字段,是否可以没有一个?
How can I compare a cds element to a return value of an ABAP function?
As an example: An employee is assigned to a company and the company has orders from customers. These orders are displayed in a table and employees should only see orders for the company they are working for.
If employee A was working for Company B, the role would be something like this:
grant select on ConsumptionViewName where company = ‚B‘;I now want to make this hardcoded 'B' dynamic and there is an ABAP helper function that returns the employer of an employee which should be used. There aren't any authorization objects that have a field for the company, is it possible to do it without one?
最满意答案
您无法为CDS DCL提供动态值。
如果找不到合适的权限对象,您可以定义自己的权限对象并让DCL完成其工作,也可以通过使用ABAP帮助程序函数过滤结果来过滤网关层的结果。
There is no way you can supply your dynamic values for the CDS DCL.
If no suitable authority object is found, either you define your own one and let DCL do its job. Alternatively you can filter the result at Gateway layer (methods in ...DPC_EXT class) by filtering the result with the ABAP helper function.
更多推荐
company,ABAP,公司,电脑培训,计算机培训,IT培训"/> <meta name="description&q
发布评论