Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

cds view case syntax

marco_sposa
Participant
0 Kudos

Hello expert,

i'm struggling with a CDS view syntax.

According to fact that the supplier value is only numerical or aplhanumerical i will concatenate field in a different order.

in my case

something like

Thank in advance

case
when lifnr (is numerical)
then concat_with_space(...
else
concat_with_space(...
end as zdef
4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos

What is your issue? Can you explain with example what is the input data, and what you expect?

marco_sposa
Participant
0 Kudos

Hello Sandra thank you for reply

i have a CDS view on reguh/regup table with an association to lfa1

i'm trying to build a consumption view in witch i have a new column with the concatenation of the address

the issue is that according to the value of lifnr i have to use reguh field for my concatenation when lifnr is numc ('12345' ) other wise (ABCDE) i have to concatenate the value for _lfa1.

i'm struggling with the syntax ( how to check if the value is numeric or not ) like the abap function check CATS_NUMERIC_INPUT_CHECK or using regex .

I read documentation about regex in cds with i can't figure out what is the correct syntax

Sandra_Rossi
Active Contributor
0 Kudos

REPLACE_REGEXPR exists since ABAP 7.55. What is your version?

Moreover, it can be used only on a View Entity, not DDIC-Based View.

marco_sposa
Participant
0 Kudos

Hello thanx for your reply it's DDIC-based view and i'm not trying to cleansing the value just check if it's numeric or not, i though i could do it in the cds