You can use session management to ensure that the session is deleted if the user navigates to other pages, or ended at the end of the transaction.
These two variants of the ITSmobile session management are described below:
Deleting Sessions if the User Navigates Away
To end running sessions by navigating to other pages in the browser, the ITS provides the auxiliary service /sap/public/bc/its/mobile/start .
This service offers a simple implementation of the feature known as DisconnectOnClose in the SAP GUI for HTML. Without even starting a session, the service creates a frameset on the browser and loads the mobile service into a frame.
If the frameset is destroyed by the user navigating to another site, the another log-off request is sent to the service loaded in the frame, and the existing session is therefore ended.
Example of calling a mobile service with DisconnectOnClose support using the auxiliary "Start" service:
.../sap/public/bc/its/mobile/start?~startservice=/sap/bc/gui/sap/its/test/mobile/itsmobile01&sap-client=000
Ending Sessions at the End of a Transaction
If your service consists of only a single transaction, set the following service entry in the GUI configuration of the service:
~SingleTransaction 1
This entry ensures that the user session is always ended with the start transaction (the transaction entered under ~transaction in the service).