Actions

Difference between revisions of "ABAP Memory"

(ABAP memory is the temporary memory storage used by ABAP programs and objects that are using the same internal session - or same memory area - for all activities.)
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
ABAP memory is the temporary memory storage used by ABAP programs and objects that are using the same internal session - or same memory area - for all activities. Compared to SAP memory, which is considered a global memory, ABAP memory is a local memory. ABAP memory is independent of the ABAP (Advanced Business Application Programming) programs or objects that generate it, thus making it possible to transmit values across different objects or programs irrespective of their characteristics. This is particularly useful for programs that are live in the same session.<ref>Defining ABAP Memory [https://www.techopedia.com/definition/28653/abap-memory Techopedia]</ref>
+
'''ABAP memory''' is the temporary memory storage used by ABAP programs and objects that are using the same internal session - or same memory area - for all activities. Compared to SAP memory, which is considered a global memory, ABAP memory is a local memory. ABAP memory is independent of the ABAP (Advanced Business Application Programming) programs or objects that generate it, thus making it possible to transmit values across different objects or programs irrespective of their characteristics. This is particularly useful for programs that are live in the same session.<ref>[https://www.techopedia.com/definition/28653/abap-memory Defining ABAP Memory]</ref>
  
ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
+
ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program that you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
  
*External session: - when user logs on to R/3 system, the system Creates a new terminal session called external session. E.g. System Session.
+
*External session: - when the user logs on to R/3 system, the system Creates a new terminal session called the external session. E.g. System Session.
*Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with CALL DIALOG) or a report (with SUBMIT or RETURN).
+
*Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with CALL DIALOG), or a report (with SUBMIT or RETURN).
  
In general each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
+
In general, each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
  
 
The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session. Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
 
The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session. Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
  
 
ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
 
ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
+
to a program that you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
  
External session: - when user logs on to R/3 system, the system Creates a new terminal session called external session. E.g. System Session.
+
*External session: - when the user logs on to R/3 system, the system Creates a new terminal session called the external session. E.g. System Session.
 +
*Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with CALL DIALOG), or a report (with SUBMIT or RETURN).
  
Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with CALL DIALOG) or a report (with SUBMIT or RETURN).
+
In general, each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
  
In general each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
+
The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines, or function modules) their main program and working data are also loaded into the memory area of the internal session.
  
The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session.
+
Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.<ref>[https://wiki.scn.sap.com/wiki/display/Community/ABAP+MEMORY+AND+SAP+MEMORY Explaining ABAP Memory]</ref>
  
Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.<ref>Explaining ABAP Memory [https://wiki.scn.sap.com/wiki/display/Community/ABAP+MEMORY+AND+SAP+MEMORY SAP Community Wiki]</ref>
 
  
 +
'''SAP Memory vs ABAP Memory'''<br />
 +
ABAP (Advanced Business Application Programming) programs run on an SAP database. ABAP programs can utilize two types of memory, ABAP memory, and SAP memory. The main difference between these two types of memory is their scope. ABAP memory is pretty limited and can only be accessed within one main internal session. Other programs running outside that session will not be able to read or write to that memory. On the other hand, SAP memory is pretty much like global memory and is accessible not only by programs that are running under the same main session but also across different main sessions.
  
'''SAP Memory vs ABAP Memory'''
+
The different scopes between the two lead to two different uses. The main use of ABAP memory is to make data accessible across multiple transactions within the same session. Although SAP memory is also capable of performing this function, it is reserved for its own purpose; making information available or transferring data across the main session.
  
ABAP (Advanced Business Application Programming) programs run on a SAP database. ABAP programs can utilize two types of memory, ABAP memory and SAP memory. The main difference between these two types of memory is their scope. ABAP memory is pretty limited and can only be accessed within one main internal session. Other programs running outside that session will not be able to read or write to that memory. On the other hand, SAP memory is pretty much like global memory and is accessible not only by programs that are running under the same main session but also across different main sessions.
+
Not only do these two memory types differ in usage, but they are also accessed differently. When dealing with SAP memory, the commands GET PARAMETER and SET PARAMETER are used while IMPORT FROM MEMORY and EXPORT TO MEMORY is used to read and write data to the ABAP memory. This makes it relatively easy to program as you are already indicating the type of memory that you want to use with the command that you are using; rather than using other parameters.
  
The different scopes between the two lead to two different uses. The main use of ABAP memory is to make data accessible across multiple transactions within the same session. Although SAP memory is also capable of performing this function, it is reserved for its own purpose; making information available or transferring data across main session.
+
ABAP and SAP memory are essential tools when coding ABAP applications. It is important that they are used appropriately in order to minimize resource usage and enhance the speed and efficiency of the application.<ref>SAP Memory vs ABAP Memory [http://www.differencebetween.net/technology/software-technology/difference-between-sap-memory-and-abap-memory/ Difference Between]</ref>
  
Not only do these two memory types differ in usage, they are also accessed differently. When dealing with SAP memory, the commands GET PARAMETER and SET PARAMETER are used while IMPORT FROM MEMORY and EXPORT TO MEMORY are used to read and write data to the ABAP memory. This makes it relatively easy to program as you are already indicating the type of memory that you want to use with the command that you are using; rather than using other parameters.
 
  
ABAP and SAP memory are essential tools when coding ABAP applications. It is important that they are used appropriately in order to minimize resource usage and enhance the speed and efficiency of the application.<ref>SAP Memory vs ABAP Memory [http://www.differencebetween.net/technology/software-technology/difference-between-sap-memory-and-abap-memory/ Difference Between]</ref>
+
== See Also ==
 +
[[Computer Program]]
  
  
===References===
+
== References ==
 
<references/>
 
<references/>
  
  
===Further Reading===
+
== Further Reading ==
*How To Use Memory ID (ABAP Memory) [http://www.abapcookbook.com/sap-abap-tutorials/how-to-use-memory-id-abap-memory/ AC]
+
*[http://www.abapcookbook.com/sap-abap-tutorials/how-to-use-memory-id-abap-memory/ How To Use Memory ID (ABAP Memory)]
*Exporting and importing data objects from and into Abap memory [https://it.toolbox.com/question/exporting-and-importing-data-objects-from-and-into-abap-memory-061809 IT Toolbox]
+
*[https://it.toolbox.com/question/exporting-and-importing-data-objects-from-and-into-abap-memory-061809 Exporting and importing data objects from and into Abap memory]
*A Developer’s Guide to Protecting Memory: Detect and Eliminate Damaging Memory Leaks with ABAP Memory Inspector [https://sapinsider.wispubs.com/Assets/Articles/2008/October/A-Developers-Guide-To-Protecting-Memory-Detect-And-Eliminate-Damaging-Memory-Leaks-With-ABAP-Memory SAP Insider]
+
*[https://sapinsider.wispubs.com/Assets/Articles/2008/October/A-Developers-Guide-To-Protecting-Memory-Detect-And-Eliminate-Damaging-Memory-Leaks-With-ABAP-Memory A Developer’s Guide to Protecting Memory: Detect and Eliminate Damaging Memory Leaks with ABAP Memory Inspector]
 +
__NOTOC__

Latest revision as of 15:35, 16 January 2023

ABAP memory is the temporary memory storage used by ABAP programs and objects that are using the same internal session - or same memory area - for all activities. Compared to SAP memory, which is considered a global memory, ABAP memory is a local memory. ABAP memory is independent of the ABAP (Advanced Business Application Programming) programs or objects that generate it, thus making it possible to transmit values across different objects or programs irrespective of their characteristics. This is particularly useful for programs that are live in the same session.[1]

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program that you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

  • External session: - when the user logs on to R/3 system, the system Creates a new terminal session called the external session. E.g. System Session.
  • Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with CALL DIALOG), or a report (with SUBMIT or RETURN).

In general, each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.

The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session. Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program that you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

  • External session: - when the user logs on to R/3 system, the system Creates a new terminal session called the external session. E.g. System Session.
  • Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with CALL DIALOG), or a report (with SUBMIT or RETURN).

In general, each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.

The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines, or function modules) their main program and working data are also loaded into the memory area of the internal session.

Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.[2]


SAP Memory vs ABAP Memory
ABAP (Advanced Business Application Programming) programs run on an SAP database. ABAP programs can utilize two types of memory, ABAP memory, and SAP memory. The main difference between these two types of memory is their scope. ABAP memory is pretty limited and can only be accessed within one main internal session. Other programs running outside that session will not be able to read or write to that memory. On the other hand, SAP memory is pretty much like global memory and is accessible not only by programs that are running under the same main session but also across different main sessions.

The different scopes between the two lead to two different uses. The main use of ABAP memory is to make data accessible across multiple transactions within the same session. Although SAP memory is also capable of performing this function, it is reserved for its own purpose; making information available or transferring data across the main session.

Not only do these two memory types differ in usage, but they are also accessed differently. When dealing with SAP memory, the commands GET PARAMETER and SET PARAMETER are used while IMPORT FROM MEMORY and EXPORT TO MEMORY is used to read and write data to the ABAP memory. This makes it relatively easy to program as you are already indicating the type of memory that you want to use with the command that you are using; rather than using other parameters.

ABAP and SAP memory are essential tools when coding ABAP applications. It is important that they are used appropriately in order to minimize resource usage and enhance the speed and efficiency of the application.[3]


See Also

Computer Program


References


Further Reading