cancel
Showing results for 
Search instead for 
Did you mean: 

Filter by language is not working (scripted view)

Former Member
0 Kudos

Hi,

I wrote a scripted view for testing the concatenation of columns (String_AGG). The view should also retrieve the description for code values. I used the "$$language$$" construct but it is not working.

Hard coding the language returns any data. But using the language doesn't return any data:

Thanks,

Ingo

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

Hello Ingo,

what is $$language$$ in your opinion? A system variable? No such system variable exists to my knowledge.

You can determine the language of your session context using following statements:

select session_context('LOCALE') from dummy; -- e.g. en_EN

select session_context('LOCALE_SAP') from dummy; -- e.g. E

So you could select the language into a variable and use the variable in your statement:

declare lv_language nvarchar(1);

select session_context('LOCALE_SAP') into lv_language from dummy;

Best Regards,

Florian

Former Member
0 Kudos

Hi Florian,

thanks! But I use pre-defined variables such as "$$client$$" in graphical calculation views without any problems and so I thought, I could use a similar one in scripted views too.

Best regards,

Ingo

pfefferf
Active Contributor
0 Kudos

Yes, that is the syntax to access variables and parameters in graphical views. But these syntax cannot be used in SQLScript/scripted views.

Best Regards,

Florian

Answers (0)