视图参数中的CDS LIKE过滤器 [英] CDS LIKE filter from view parameter
问题描述
如何创建从表KNA1
以A%
开头的表KNA1
中选择所有KUNNR
的CDS.
How to create a CDS that select all KUNNR
from table KNA1
that Customer Number
starts for example with A%
.
我可以在where子句中使用LIKE
,但条件的RHS
必须是静态的.它应该取决于CDS的输入参数.
I could use LIKE
in the where clause but the RHS
of the condition have to be static. It should depend on the input parameter from CDS.
是否可以使用CDS做到这一点?
Is it possible to do it with CDS?
推荐答案
我看到两个选项.
-
您将摆脱CDS输入参数处理,并将逻辑移至ABAP.用like语句将OPEN SQL select写到CDS上.
You get rid of your CDS input parameter handling and move the logic to ABAP. Write your OPEN SQL select on your CDS with like statement.
使用 CDS表功能和 AMDP 向下推like
语句到HANA原生.只需在这里发布即可.
Use CDS Table function and AMDP by pushing the like
statement down to HANA native. Just follow my post here.
希望它会有所帮助.
这篇关于视图参数中的CDS LIKE过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!