cancel
Showing results for 
Search instead for 
Did you mean: 

Inablility to retrieve values of session variables in irpt page

Former Member
0 Kudos

We currently are using xMII 11.5. We are having difficulty retrieving values assigned to our created session variables.

We have defined 2 users, each associated with session variables whose values differ by user. Each user is associated with a different irpt page which retrieves information based on the values passed by the session variables. Both pages return correct information in the grid using the as the param.1 value on the opening of the page. On one page, we are able to retrieve the values of the session variables in Javascript by placing hidden fields on the document and using the document.getelementbyID("hiddenValue1").value. The other irpt will only bring back the name of the of the session variable in the curly braces, .

Both users are set up the same in System Security and Data Access. If we switch the pages opened for the user in the Portal Navigation, one page will return the values no matter which user and the other page will always bring back the session variable name in the braces. This makes us believe that it is not a problem with the user setup or the definition of the session variables.

Would anyone be able to help us understand what needs to be done to correct this issue?

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

How are you getting the values into your session?

"/Lighthammer/PropertyAccessServlet?Mode=List" will show you the active user's session information and should help you troubleshoot name/value pairs.

Former Member
0 Kudos

Mike and Jeremy,

Currently we are in development, so we are opening the 2 different pages on the same machine, but not on the same machine at the same time. We logout and relogin when we are switching users.

We are getting values into the session variables by setting them through Security on the user. We are also passing values in the Navigation such as /Sauder/LGCYProto/TeamLeader/TeamLeaderView.irpt?MaintDept=(32139,32140)&OperID=(38,208)&OperIDUnreleased=(8794).

I used the "/Lighthammer/PropertyAccessServlet?Mode=List" to get the listing for each of the irpt's and they are listing the correct values associated with the session variables for each user.

I'm still unsure why I'm not able to pull the value of the session variable through Javascript on the TeamLeaderView.irpt.

jcgood25
Active Contributor
0 Kudos

Michelle,

Have you tried URL encoding your irpt pass through parameters in your Navigation link? Perhaps the commas and parenthesis are causing some issues ( http://help.sap.com/saphelp_xmii115/helpdata/en/Getting_Started/Template_Editor/Query_Construction.h... )

Just to clarify, the Role/User attributes defined in LHSecurity are truly session properties, and the session properties are shown by the PropertyAccessServlet results. Adding the name/value pairs to the URL are only a one-shot pass through to the ReportServlet that processes web pages with .irpt extenstions, so they don't actually set the session properties and are non-retentive beyond the one page. As you are presently doing with the navigation links, we typically recommend URL passthroughs for page to page activities and using the session itself for name/value pairs that you want to set once and use anywhere throughout your application.

document.APPLET.getPropertyValue(NAME); will also give you access to the session through javascript, but if you do a view...source in the browser after your TeamLeaderView web page has loaded you should see the results of the search/replace efforts of the ReportServlet, and the javascript you are using to get values out of hidden form field elements should simply reflect the text you see in the view source window.

If they work inside APPLET tags like you mentioned for Param.1 you could also use document.APPLET.getQueryObject().getParam(1); instead of the hidden form field elements, and remember that you have 32 params and if they are not used in the underlying query can provide a very nice place to 'catch' the results like you are are doing with hidden form field elements that could potentially get reset by a form button.

Regards,

Jeremy

Former Member
0 Kudos

Jeremy,

Thank you so much for the information and the link. I was able to use the APPLET tags to "catch" the results I needed to work with the query.

Have a great day!

Michelle

Answers (1)

Answers (1)

0 Kudos

Hi Michelle,

Are you opening the two irpts on the same machine with the two different users?

Regards,

Mike