Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 cds 元素与 ABAP 函数的返回值进行比较?
例如:一名员工被分配到一家公司,该公司有客户的订单。这些订单显示在表格中,员工只能看到他们所在公司的订单。
如果员工 A 为公司 B 工作,那么角色将是这样的:
grant select on ConsumptionViewName where company = ‚B‘;
我现在想让这个硬编码的“B”动态化,并且有一个 ABAP 帮助函数,它返回应该使用的雇员的雇主。没有任何授权对象具有公司的字段,没有一个可以做到吗?
您无法为CDS DCL.
CDS DCL
如果没有找到合适的权限对象,您可以定义自己的权限对象并让 DCL 完成其工作。...DPC_EXT或者,您可以通过使用 ABAP 辅助函数过滤结果在网关层(类中的方法)过滤结果。
...DPC_EXT