Skip to Content
avatar image
Former Member

Create temporary local table in function on HANA

Hello everybody,

I try to create a function in SAP HANA studio returning a table. Inside this function a temporary local table must be created and populated. Using the same method in sql server everything runs smoothly but in HANA I get an error on local table creation: "SAP DBTech JDBC: [7]: feature not supported: DDL is/are not supported in table function: line 16 col 5 (at pos 720)"

I guess HANA does not support temporary table creation inside functions, If I am wrong please correct me, but if that's true is there a similar way to store temporary table results in some kind of variable inside a function?

Kind Regards,

Dimitris

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 22, 2017 at 11:23 AM

    Hi Dimitris,

    Table Functions are read-only user-defined functions, hence DDL statements are not supported.

    I had a similar requirement and achieved it with a work around solution by creating a stored procedure, I then used the procedure in table function.

    Hope this helps.

    Best Regards,

    Rajaa

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Rajaa,

      thank you for your answer.

      It seems like this workaround is the only possible solution to this problem.

      Kind regards,

      Dimitris Theotokatos