Skip to Content

JDBC (SQL) access for CDS view that uses @ClientHandling.algorithm: #SESSION_VARIABLE

Hello,

We try to use controlled access to S/4 HANA data using CDS views.

Some of Standard CDS Views (like I_MATERIAL oder I_BUSINESSPARTNER) use @ClientHandling.algorithm: #SESSION_VARIABLE to determine which set of data is to be returned.

We tried to set Client session variable using JDBC connection String, "jdbc:sap://ourHANAhost:31044?sessionVariable:CLIENT=200" but it didn't help.

The result to the query SELECT * FROM SAPABAP1.IMATERIAL is empty result set.

Are we doing something wrong?

Thanks in advance for any hint.

Sincerely

I. Lastric

Add comment
10|10000 characters needed characters exceeded

  • The result to the query SELECT * FROM SAPABAP1.IMATERIAL performed on the JDBC connection is an empty result set.

    Are we doing something wrong?

    We also tried setting default session client on HANA user, but it didn't helped either.

    Thanks in advance for any hint.

    Sincerely

    I. Lastric

  • Get RSS Feed

1 Answer

  • Mar 12 at 03:32 AM

    Try with what the documentation says: CDS_CLIENT is the session context variable you need to set. See https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenamdp_client_handling.htm.

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks for the comments.

      I'd like to focus on how to provide missing CDS_CLIENT context variable, but have found nothing we could try.

      The ODBC connection properties are set once for the connection between tenants and there would be a problem if we need to switch the client - which is often needed in DEV and QUA environment. But we'll look into it.

      The last point - TUDF seems interesting.

      I found some documentation in SQL Script reference, but found nothing about setting the context there.

      Would you place TUDFs on a S/4 tenant or within the application tenant?