cancel
Showing results for 
Search instead for 
Did you mean: 

Logging off a mobile BSP application using MVC.

dan_hagaman
Explorer
0 Kudos

Hello,

I have been struggling to figure this one out for a while now. I have created a BSP application following the guide of John Moy here: http://scn.sap.com/community/mobile/blog/2010/11/20/build-your-first-mobile-web-app-using-jquery-mob....

Now my question is how can I add a logoff button to ensure the users have to log in if they revisit this page? I have been searching and trying everything I can find with no luck.

If anyone has any suggestions I would be very grateful!

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

soldner
Participant
0 Kudos

Hey Dan, did you get it to work?

I'm doing about the as you, but have 3 linked BSPs apps (one is the 'portal' to the others) and need a logoff to close the browser sessions and return to the logon page of the first BSP.

Currently I created another BSP (copy of system_private) and that seems to work as I expect.  Haven't added Jquerymobile yet.  That might be the showstopper. 

soldner
Participant
0 Kudos

Got mine to work. Looks good and mamagers like it. Used JQmobile to add some flash and a couple of buttons to logoff or cancel.  There is still that text "Ending User session..." that the managers want to get rid of.  Looks like a mod though.  Anyone have ideas?  Blank would be good.

Former Member
0 Kudos

Hi,


This sentance come from SYSTEM bsp page 'sessionexit.htm', which uses text from textpool of class CL_BSP_LOGIN_APPLICATION.

If you use your own copy of SYSTEM bsp than you can change it there.

Best regards, Artem

soldner
Participant
0 Kudos

Thanks Artem, but I'm using SAP standard.  I'll look at enhancement point

SE:(1) Class CL_BSP_LOGIN_APPLICATION, Method SESSION_EXIT_PROCESSING, Start  and see if that'll do it.

Former Member
0 Kudos
Former Member
0 Kudos

The second suggestion provided by Marc is the SAP-recomended way you shall play around it and adapt it to your mobile app.

Former Member
0 Kudos

True, unfortunately the link and documentation is a bit old (Netweaver 2004) and the "SYSTEM" BSP you are supposed to copy has more dependent views than the document mentions. It's also not clear how it works and it's a bit ugly (frames and spaghetti code).

My first suggestions "works" in that it definitely ends the session but it does redirect to a 404 (page not found /mypath(====)/bsp/system/sessionexit.htm) so you wouldn't just do location.href or your user will get an error page. In our system we have a logoff.htm page which contains a hidden image which logs you off:

You are now logged off!
Click <a href="default.htm">here </a> login again or <a href="javscript:window.close()">exit</a>.
<img src="?sap-sessioncmd=logoff" width="1" height="1">

Works fine for us.

Ideally we would like a way to do this in ABAP, surely even the SYSTEM BSP runs ABAP code to kill the session. Does anyone know?

Former Member
0 Kudos

We drift from initial discussion but ...

I guess (or as I am understanding it) the main problem why we shall go over HTML side is that you want to remove authorization cookie from browser so other user could not just open another tab and get logged into aplication again authomatically by browser who sends your cookie with every server request. So you had to make a call to server which in return will send you response with invalid cookie or clear yor browser's cookie.

Basically you shall support following situations when doing HTTP apps with SAP:

  • user execute log off action (e.g. press log off link)
  • user navigate to another page (from your app or by typing different address in browser address line)
  • user is too long in idle mode

SAP solution with system and system_public (covers that all situations, althought code is ugly and frames are not modern anymore)

Best regards, Artem