Get all data that match to the start letter

2019-08-18 23:48发布

How to create a CDS that select all KUNNR from table KNA1 that Customer Number starts for example with A%.

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.

Is it possible to do it with CDS?

标签: abap cds
1条回答
【Aperson】
2楼-- · 2019-08-19 00:40

I see two options.

  1. 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.

  2. Use CDS Table function and AMDP by pushing the like statement down to HANA native. Just follow my post here.

Hope it helps.

查看更多
登录 后发表回答