Skip to Content
-1

Can we use CTE in a table functions in HANA?

Jan 02 at 07:07 AM

95

avatar image

Hi Experts,

I just want to know, can we use CTE in a Table Functions in HANA?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

ERALPER YILMAZ Jan 03 at 01:55 PM
0

Hello,

Not CTE expression but you can assing the SELECT statement output to a table variable and then return that variable as follows

cte =    select 
     vbeln
   from "SAPABAP1"."VBAK"
   where 
     vbeln between :minV and :maxV;
return :cte;

You can place above code as the body of the table function where CTE select list maps to the columns of the returning table structure

Share
10 |10000 characters needed characters left characters exceeded