If you worked on complex S/4HANA ABAP CDS views, you probably run into “User-defined functions are not supported in the SEARCHED CASE WHEN clause” error message. You can workaround this problem either splitting complex view into 2 more simple nested views or implementing AMDP table function. But what if you are too lazy to do that, then smart solution described in this blog is for you.

According to documentation, indeed user-defined functions are not supported in the SEARCHED CASE WHEN clause. Like in my example, LEFT and SUBSTRING functions are not supported. But the same documentation  provides you a solution as well – LIKE pattern comparisons.

All it takes in my case, is to think out the box and replace string functions with LIKE pattern comparisons

 

 

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x