Skip to Content
avatar image
Former Member

Filter by language is not working (scripted view)

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

LanguageE.jpg (93.3 kB)
LanguageVar.jpg (67.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 16, 2015 at 07:03 AM

    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

    Add comment
    10|10000 characters needed characters exceeded