Skip to Content
0
Former Member
May 12, 2005 at 05:32 PM

WDClientUser API doesn't always return the current logged-in portal user!!

17 Views

Hi,

I have accessed a web dynpro application through an iView in Enterprise Portal. I have used the WDClientUser API provided by SAP, in this application to display the first and last name of the user who has currently logged into the portal. The methods that I have used are :

1) WDClientUser.getCurrentUser().getSAPuser().getFirstName()

2) WDClientUser.getCurrentUser().getSAPUser().getLastName()

More importantly, I am using the "WDClientUser.getCurrentUser().getSAPUser().getUniqueName()" method to check the USERID and use it to call a few BAPIs from a backend R/3 system.

Everything works fine...until the scenario described below occurs :

1) I log into the portal as user "A". Call the BAPIs through the Web Dynpro adaptive RFC model and may or may not make modifications to the SAP tables corresponding to "A".

2) I log off from the portal..using the sign-out link. Please note that I LOG OFF, and dont just close the browser, after which I am brought back to the standard log-in page.

3) In the same browser window, I now log in as, say user "B". Now when I go to the iView that contains the same web DynPro application, it sometimes, shows me the records of user "A", instead of the currently logged in , user "B".

4) It doesn't stop at just this. In fact, it works so completely, so as to allow me to call the BAPIs and make changes to the old user's records.

I have tried refreshing the browser window, iView and have even cleared the system cache, but the above sequence of events still continues. I have also disabled the client side caching of the iView and page and tried to re-run the application, but to no avail.

I have used the "WDClientUser.forceLogoffClientUser()" & "WDClientUser.releaseClientUser()" methods of the API in the wdDOExit() method of my custom controller, in an effort to explicitly remove any traces of the current user after he logs off the portal, but again, it didnt yield any significant results.

However, one thing that I have consistently observed, is that the application works perfectly as expected, when a new browser window is opened and the second login (user B) is made from this new window. In this case, the application returns results of the newly logged in user.

Please let me know if anyone of you has faced a similar situation.....

Thanks & regards,

Navneet .