cancel
Showing results for 
Search instead for 
Did you mean: 

Default Client(Mandt) in SqlScript Calculation views

fulvioval
Explorer

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,

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

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

fulvioval
Explorer
0 Kudos

Thanks a lot Florian! Worked fine.

I found a documentation about this in http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/e74dc875191014b20c81d140d67e42/content.htm

Answers (0)