Skip to Content

Accessing Session Identifier

Hi All,

How would I access the session identifier from within a Web Dynpro application?

Without going into all the details of why I need it, I would like to have access to the smallest String available that would uniquely identify a Web Dynpro's user session. I have no other requirements for this string other than it must be unique across all the current sessions.

Thanks for your help,


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2004 at 12:11 PM

    Hi Greg,

    as Karin Schattka said "there is some mechanism but it is dangerous and out of the WebDynpro framework" and therefore it is hidden.

    You can see my posting "User session access in WebDynpro" and the answers there.

    Also if you describe your case somebody may soggest you work around. But I think you have to forget to use the session object like in J2EE Web Applications:)



    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Metodi and Group,

      I saw Karin's reponse to your message. I do not intend to do anything with the session object itself. I just need a unique identifier (string) for the session so that I can use it as an identifier on the back end. In a nutshell, we are integrating a Web dynpro application with a custom designed SAP GUI for HTML transaction. We have not been able to find a way to communicate from the SAP GUI for HTML transaction (which will be in a Web Dynpro component via an IFrame) back to the Web Dynpro application that originally triggered the transaction to start.

      For those of you who are really interested, here is the scenerio:

      1. A user of a web dynpro application presses a button that indicates they want to do a search for the value in a given field on the screen. This triggers a call to an embedded WD component that displays view with an IFrame that points to a generic transaction on our back end.

      2. The generic back end function reads parameters out of the URL used in SAP GUI for HTML including the name of the standard or custom R/3 search help. (Another parameter passed is the string representation of the session id. Once again I am only using this for a reference, nothing else.) Once the URL string is built, an event is raised in the embedded WD component that indicates that the search has started. The custom transaction displaying the R/3 search help now commenses.

      3. Another view of the embedded component responds to the "search started" event and calls a function on the back end system that will essentially wait until the search is finished and it receives results in the form of the information selected from the search help. This data is delivered by the back end transaction once the search is complete. This is why I need an identifier of the session, so that I can tell the responses from the back end appart. (Obviously we would much rather raise an event from SAP GUI for HTML through the IFrame in the embedded WD Component once the search is finished, but we have not been given directions or support that this option is possible.)

      4. Once the function recieves the results from the search (or that is was canceled), then we trigger an event that says the search is complete. This event is accepted by the view that displayed the IFrame with the SAP GUI for HTML transaction to allow it to be minimized and by the original Web dynpro application to tell it to refresh the newly set selected values.

      We have a proof of concept that shows this works. It saves us a lot of coding time for the many different searches that are needed for our project, plus we don't want to put terribly much effort into coding new searches when SAP's enterprise service framework and our (I am an SAP consultant) WD based patterns may prove to be so useful that much of this work should be revisited in the not too distant future.

      As a side note, we have found in print that SAP GUI for HTML transactions that are posted as separate iViews can communicate portal (client) events that could be responded to by our WD application, but we don't have an example. (We could re-direct the SAP GUI for HTML transaction after to another URL that contains something that triggers the event to the Portal, but I don't want to have to deal with the positioning of multiple iViews within one Web Dynpro application. (Not to mention I am not running portals on each developer machine.) Anyway, by making the IFrame that runs the SAP GUI for HTML appear in an embedable WD component, we have a bit more freedom over the look of our application. (We will probably use a WD window that overlies part of our other WD windows during the time of the search.)

      I'm sure that was more than anyone ever wanted to know about this, but I just need a unique identifier (as a string) for the session. I could just use the user name (they should only be doing one search at a time, and they will be named users) - but if I could get a more definite match I would be grateful.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.