Wednesday 21 February 2024

SAP Memory Management

 



SAP Memory Management:
                        
                      While working on SAP ABAP systems, we often facing memory-related "DUMPS" error in "ST22" or some time see work processes go in "PRIV mode" when checked in t-code "SM50". We wondering why such things happen in running in the SAP system and how to handle it. To understand this, we first need to understand what "SAP memory" is and how "SAP Memory Management" is done. So let’s get start to know the basic concept of SAP Memory management.


What is SAP Memory:
                    
                SAP memory is a memory area to which all main sessions within an "SAP GUI" have access. You can use SAP memory either to pass data from one program to another within a session or to 
pass data from one session to another.

Workflow for SAP Memory:

               When a user logon to an application server instance (AS instance) in the ABAP system, a user session is opened. Within a session, the user sends a request to Application Server ABAP (ASABAP). An ABAP program is started that is executed by multiple work processes. A separate memory area is assigned to each user session. 

              To run an ABAP program within a user session (internal session), the work process allocates memory, which contains user data (user context), as well as program data. Depending on the type of data, it is located in different memory areas. SAP Memory Management decides when and in what order a work process allocates specific memory areas. The order of memory allocation depends on the work process type (dialog or non-dialog) and on the underlying operating system.

Types of SAP Memory 

On a very high level, there are mainly two types of memory areas in SAP 
  1.  Extended Memory (EM) 
  2.  Heap Memory 
If we go a little deeper, then we have in total 6 memory areas 
  1. SAP Shared Memory (SHM) 
  2. Extended Segments Memory (ES) 
  3. Extended Memory (EM) 
  4. Global Extended Memory (EG) 
  5. PRIV Memory (HEAP) 
  6. PROC Memory 

We will see upcoming post IN details about SAP Memory types.



Reference:
  1. help.sap.com 
  2. SAP Notes 
  3. Linkedin


EmoticonEmoticon

Note: only a member of this blog may post a comment.