cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing the LOG OFF url click action in a Webdynpro application

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi,

I have this requirement where I need to know when the User logs off in a webdynpro application.

I have several webdynpro applications, each independent, and each need to do some clean up tasks when the user clicks on the LOG OFF url in the portal login.

Is there some standard event attached with the LOG OFF Url of the portal login?

And could anybody please specify when exactly would the <i>wdDoExit()</i> method of the application view(s) or the application component controller get's trigerred when the application is run from the portal login?

Thanks in Advance.

Regards,

Swapna Priya.

Accepted Solutions (1)

Accepted Solutions (1)

luciano_leitedasilva
Contributor
0 Kudos

Hi Swapna,

The event wdDoExit() is called is same occasions:

  • Session timeout,

  • Close the navigation browser

  • User Logoff

  • When the component is explicitly destroyed by other one application or componet.

So, when you are using JCO Destinations using SSO between Portal and SAP, this connection is automatically released.

If you have anymore questions about this, feel free to ask!

Regards,

Luciano

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Luciano,

I actually need to send back some data to SAP back end system through an RFC call when the portal login is to be closed either using the LOG OFF url or through a browser close.

I did try to put this RFC call in the component controller's wdDoExit method. But nothings happening at the SAP side.

I did also try to download the MASTHEAD par file into NWDS and check if i can put some custom code (in javascript here) in the LOG OFF url click functionality.

But am unable to import the par file itself properly into NWDS in the first place. Its always importing the par file without the class files of the JSPs in that MAST HEAD par file.

Could you please suggest an alternative to my requirements above?

Thanks for your replies.

Regards,

Swapna Priya.

luciano_leitedasilva
Contributor
0 Kudos

Swapna,

I did something like that. In my system, when the user fire a event to edit a object, the back end system lock this object. If the user close the session or close the browser the application has to unlock this object in the same way. To do this, the wdDoExit is used to call the back and system and release all locked objects of this user. This work fine.

I think that MASTHEAD's changes will not solve this issue, because you have to control this in you application.

Best Regards,

Luciano

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Luciano,

I did try putting a RFC call in the wdDoExit method of the component controller of the application. But its not working for me.

What i did was I did some database updates in the RFC at SAP side. But when i execute my application and then close the browser/logoff and go and check the database in SAP nothings updated

Am I placing the code in right wdDoExit()? Its currently in component controller's code.

Thanks & Regards,

Swapna Priya.

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Luciano,

I was successfully able to call the RFC from wdDoExit() method of the component controller.

Also I could successfully place a custom alert call when the user clicks on the LOGOFFurl in the portal browser.

Now I have one more pending requirement for me to completely use this cycle of events.....The Portal Browser close action i.e., 'X' action.

I did find a forum link with some code for the same but i did not understand where to place that code and have already raised a reply for hte same.

Below is the link:

/message/230174#230174 [original link is broken]

Do you have any idea about how to trap this?

Thanks for all your support

Regards,

Swapna Priya.

Answers (1)

Answers (1)

Former Member
0 Kudos

Swapna,

Can you share how you did this(where did you put the code and after what are these events fired?)

Thank you