Tuesday, August 23, 2011

OBIEE : Beware of Session Variables

Blogging after a long time. It may be interesting to note some interesting outcomes in the usage of server variables. You may refer to the syntax of using different OBIEE variables here. We may note that the syntax for referring a session variables is

VALUEOF(NQ_SESSION.sess_var_name) -------- (1)

To refer a repository variable,

VALUEOF("rep_var_name") --------------- (2)

But what if you refer a session variable using syntax (2)?

I have taken two such session variables CURRENT_FSCL_YEAR and CURRENT_FSCL_PERIOD from the BI Apps RPD.

The incorrect way of using a session variable CURRENT_FSCL_YEAR:


The incorrect way of using a session variable CURRENT_FSCL_PERIOD:

The result is :
As everyone can see, it has fetched the default value of the session variable for the incorrect representations. Internally repository or session, they are server variables hence this behavior. Hence it may not be good idea to mix the syntax of both the variable types.