What are SAP Session

Preface – This post is part of the ABAP Beginner series.

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 us assume that we have three landscapes, i.e. ISD, IST, ISP. These three 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 sessions. As soon, you have opened SAP GUI, you have logged into a user session. And now you have logged in to ISD, i.e. for development.  In this scenario, you have also logged in to the ABAP session.  Now, you have opened the SE38 transaction to make a report, so now you have logged in to the internal session.

If you have understood the sessions, then we can proceed with the definitions.

User Session

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.

ABAP Session

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.

Internal Session

Each call of an ABAP program creates a new internal SAP 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 user ID, select a session and hit ‘end session’.



  • Barry Allen

    A Full Stack Developer with 10+ years of experience in different domain including SAP, Blockchain, AI and Web Development.

    View all posts


3 responses to “What are SAP Session”

  1. Dawid Chrobok Avatar
    Dawid Chrobok

    Hey Barry,
    I cannot find contact on the page to you but I just want to write it in some comment section hoping it will find you. What you are doing is great, it is very helpful, you explain things in a exceptionally clear and straightforward manner. THANK YOU MATE! I hope the web-page will monetize itself to pay off the great work you do.

    1. Barry Allen Avatar
      Barry Allen

      Thanks for the appreciation Dawid. You guys keep me motivated.

  2. Nishi Pathak Avatar
    Nishi Pathak

    Thank you so much for writing this. Thanks for being so kind!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.