SAP USER SESSIONS



Get Example source ABAP code based on a different SAP table
  


VERSION 5 OUT

User Sessions
Each execution of an ABAP program takes place in an ABAP_ISESS in an ABAP session within an ABAP_ASINSTANCE user session. For this, at least one ABAP session is open in each user session.
A user session is opened whenever an ABAP user logs on to an AS ABAP . Here, the following fixed properties of the user session are defined:
User name The user name is assigned a user master record and authorizations that affect the behavior of an ABAP program. The current user name is returned by the method GET_USER_NAME of the class CL_ABAP_SYST and is available in the system field sy-uname.
Client ID The client ID determines the current client. When database content is accessed using AB_SQL , implicit client handling is used by default where only the data of the current client is accessed. The current client is returned by the method GET_CLIENT of the class CL_ABAP_SYST and is available in the system field sy-mandt.
Logon language The logon language determines the access to certain text repositories and is also the text environment language by default. The current logon language is returned by the method GET_LOGON_LANGUAGE of the class CL_ABAP_SYST. The system field sy-langu, on the other hand, contains the text environment language of the current ABAP_ISESS , which can also be set to a different value.
There are different types of user sessions in which different rules and restrictions apply when ABAP programs are executed:
Dialog sessions Dialog sessions are used for dialog processing with the SAP GUI. The ABAP programs are controlled by classic dynpros and their special forms, selection screens and classic lists.
Background sessions Background sessions are used for background processing, namely the execution of ABAP programs in the background without user interaction.
Update sessions Update sessions are used for classic non-local updates, namely the execution of registered update function modules in a dedicated work process.
RFC sessions RFC sessions are used for RFC processing , namely the execution of remotely called function modules ( RFMs).
ICF sessions ICF sessions are used for ICF processing, namely the processing of HTTP/HTTPS or SMTP queries to the AS ABAP in a handler class.
APC sessions APC sessions are used for APC processing, namely the processing of WebSocket or TCP queries to the AS ABAP in a handler class.
ABAP daemon sessions ABAP daemon sessions are used for ABAP daemon processing, namely the execution of an ABAP daemon that is automatically restarted after a program termination.
The user memory is assigned a user session as a dedicated memory area for SPA/GPA parameters and an ABAP daemon memory as a subarea.



Latest notes:

From a user session, it is possible to programmatically open further user sessions on the same or another ABAP_ASINSTANCE . For example:
A remote function call with the destination NONE or SELF opens a user session on the same ABAP_ASINSTANCE .
Calls of update modules using COMMIT WORK or execution of executable programs in background programming open separate user sessions.
ICF and APC clients can address the current or another ABAP_ASINSTANCE as ICF or APC servers and thus open new user sessions.
ABAP_HINT_END