Sunday, December 19, 2010

Configure Language settings of choice for NoetixViews to return data in OBIEE.

Oracle EBS multi-lingual capability for the data stored, by storing the translations in special _TL tables. For example, Part description in multiple language is stored in MTL_SYSTEM_ITEMS_B_TL one row for each translation. Noetix views invlude these tables in there definition to provide multi-lingual translations for the reporting. All noetix views (where translation tables are used), use "language" environment variable to identify the language in which the data is requested. When querying through OBIEE, you can choose the language in which noetix views should return data. Under "My Accounts" in OBIEE, users have capability to select there locale language and this language value is stores in a predefined OBIEE session variable VALUEOF(NQ_SESSION.WEBLANGUAGE). Following are the changed need to be done, to map obiee session value to database language. So that Noetix views return the data in the appropriate language. Following are the steps to be performed

a. Open the RPD of your choice.

b. In the physical layer, open the connection pool properties for the noetix views

c. In the Execute Before Query Tab, place the following code
Declare
lang_name = varchar2(30);
BEGIN
Select DECODE('VALUEOF(NQ_SESSION.WEBLANGUAGE)','no','NORWEGIAN','es','SPANISH','ENGLISH') INTO LANG_NAME FROM DUAL;

EXECUTE IMMEDIATE 'alter session set NLS_LANGUAGE = ' lang_name;
END;

d. Save the rpd.

Now when the user changes its locale to Spain, the weblanguage session variable will be populated with es code and an alter session command will be executed before each query execution. This way, correct language filter will be applied to the noetix views and the data will be displayed as per the user's preffered language.

No comments:

Post a Comment