• Post category:BI Publisher
  • Post comments:2 Comments
  • Post last modified:January 22, 2021
  • Reading time:2 mins read
You are currently viewing Using Session Variables in BI Reports to get logged in user info
Using Session Variables in BI Reports to get logged in user info

Session variables are used frequently in BI Publisher when the reports are being exposed to employees to add data security on top of the existing query.

We need to write query to pull only the logged in user information and for this we will use the session variable. Apart from this user, there are many other session variables and we are going to look at them now.

Logged in User Person ID – HRC_SESSION_UTIL.get_user_personid​
Logged in User Username – :xdo_user_name
Logged in User Username – FND_GLOBAL.USER_NAME
Logged in User GUID – fnd_global.user_guid
Logged in User SessionID – userenv(‘sessionid’)
Logged in User Language – USERENV (‘LANG’)
Logged in User Business Group – fnd_profile.value(‘PER_BUSINESS_GROUP_ID’)

You can add these to the SQL Query as per your requirement and get appropriate results.

If you have any questions, please feel free to reach out to me by posting in comments section.

If you are interested in learning Fusion Technical tools go through this post

If you liked the article, please share it with your friends/ colleagues/ teammates or anyone who might also benefit from it.

  • How to use these session variable in BI Publisher DataModel Query:
    Like How to write this in SQL Query

  • Use “Logged in User Person ID – HRC_SESSION_UTIL.get_user_personid​”.. The one you mentioned does not work in BI Reports.. It works for OTBI. Not too sure if PERSON_ID_HCM is valid for OTBI too.

  • In visible box by plugintheme