Skip to Content

Default Client(Mandt) in SqlScript Calculation views

Hi Experts, I need a little help.

I'm doing some calculations views here and I faced a problem: Calculations views are bringing data from all clients(mandt) of SAP.

To solve this I set default client in user that I'm using in SAP HANA in Adm Console and set default client option in Semantics to "Session Client". In graphical calulations views worked without problems but I can't find this option in SQLScript Calculation Views.

How can I do this SQLScript Calculation Views to client(mandt) work like Graphical Calculation View?

Thanks for any help,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 08, 2015 at 12:59 PM

    Hi Fulvio,

    you can read the session client with following statements.

    DECLARE lv_client varchar(3) :=  '';

    SELECT SESSION_CONTEXT ('CLIENT') AS lv_client INTO lv_client FROM DUMMY;

    Regards,

    Florian

    Add comment
    10|10000 characters needed characters exceeded