cancel
Showing results for 
Search instead for 
Did you mean: 

How to erase cache/session SAP Gateway (iOS)?

Former Member
0 Kudos

Are there any methods that can be called from our SAP Gateway application to not generate a session when user does the login, or logout when the user exit of the application?

We have created an application for iOS and Android devices using SAP Gateway. The connections code has been generated with the tools provided by SAP for Eclipse and Xcode.

Both Android and iOS have a screen on which the user does the login before accessing the data provided by the application.

When user introduce user and password we validate login with the SAP Gateway and if the login is correct we allow it access to the data of the application. The problem comes when once user have successfully logged and return back to the login screen and enter a another user with any password, the SAP Gateway system responds that user exists without validating username and password and shows their data. This error only occurs in the iOS app in Android works fine.

We have found that the SAP Gateway generates a session associated with the user and terminal of the first time that user does login. Thus when user login again with another user the SAP Gateway system really doesn't check user and password and we found with an SAP Gateway open session. The application doesn't call any method to save the connection cache on the phone and we ignore the connection cache.

Thank you very much!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

iOS clients are not my daily business but in general, ODATA is provided by http requests from ERP backend. Thus, also session handling and logon is maintained there. You may check in this backend with transaction SICF, services under /sap/opu/...

Here, you may find information how to set up logon/session handling ...

http://help.sap.com/saphelp_gateway20sp05/helpdata/en/c3/424a2657aa4cf58df949578a56ba80/frameset.htm

Regards & good luck,

Matthias

Former Member
0 Kudos

Thank you Matthias!

I thought that would be the solution, but I wanted to think that would not open a Gateway session without giving the possibility to control it from the application. I find it quite dangerous to the security of our system and the consistency of our mobile application.

In the link that you recommend me I've found this information:

http://help.sap.com/saphelp_gateway20sp05/helpdata/en/3d/45e259b4bd49e197316cbfd3c7fa8e/content.htm

Former Member
0 Kudos

Hello David,

as you said, changing (global) backend behaviour may the generic way to solve this but not the best.

May be the connection code you've generated with SAP Tools in Eclipse supply parameters which are not used by code generator. Code generators are ok for a quick run but  bad for understanding the whole picture or in case of errors.

Maybe cache/session handling can be influenced by URL parameters or http header in your client app. For this you may analyse the ABAP sided http handler for ODATA streams like SE24 class /IWFND/CL_SODATA_HTTP_HANDLER if there are some usable parameters.

Good luck 🙂

Matthias

daniel_rothmund
Participant
0 Kudos

Hi David
Have you found a solution , I have the same problem but with IE9 . With Chrome it works , the IE9 always cache my gateway requests. And so I have always old data ...

regards

Daniel

daniel_rothmund
Participant
0 Kudos

Hi ,

for me the solution was :

oModel.forceNoCache(true);

Answers (0)