softshipper
softshipper

Reputation: 34071

CDS LIKE filter from view parameter

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?

Upvotes: 0

Views: 2917

Answers (1)

Haojie
Haojie

Reputation: 5713

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.

Upvotes: 1

Related Questions