Table of Contents
What are SAP Session?
“SAP Session” are a way to control the number of logins or number of active users on a single Landscape. To make it easier let assume that we have 3 landscapes i.e. ISD, IST, ISP. These 3 landscapes will be used for different purposes i.e. for Development, Testing and Production. There are three types of sessions in SAP:
- User Session
- ABAP Session
- Internal Session
Now, SAP has given you three different environments. These are nothing but User session. As soon, you have opened SAP GUI, you have logged into a User session. And now you have logged in into ISD, i.e. for Development. At this scenario, you have also logged in into ABAP session. Now, you have opened SE38 transaction to make a report, so now you have logged in into Internal Session.
If you have understood the sessions, then we can proceed with the definitions.
Logging on to an application server opens a user session. Logons take place using SAP GUI, the RFC interface, or ICF . A user session is assigned its own memory area of the user memory. From a user session, it is possible to open further user sessions on the same application server or another server in a program-driven way.
An ABAP session is opened for each user session. Each ABAP session is assigned its own memory area of ABAP memory, in which data clusters can be stored.
Further ABAP sessions for a user session can be opened as followed:
- Enter a transaction code after “/O” in the command field in the toolbar.
- Call the function module TH_CREATE_MODE.
- Call a Dynpro when processing an asynchronous RFC.
A maximum of 16 ABAP sessions are possible per user session and the default is 6.
Each call of an ABAP program creates a new internal session, in which the called program is loaded. This is where the modifiable objects of the program are held. In one ABAP session, the maximum number of internal sessions can be nine.
Close a hung SAP Session
Let’s say you want to end session three. You can go to either session one or two and enter this command in the transaction box: /i3.
This will immediately close the hung up session (session four in this case).
Or you can do this the long way by going to SM04 and double-click your userid, select a session and hit ‘end session’.