GET_MEMORY_SIZE_OF_OBJECT SAP Method Calculate memory size of a dynamically created object
Below is documentation, parameters and attributes of ABAP Method GET_MEMORY_SIZE_OF_OBJECT within SAP class CL_ABAP_MEMORY_UTILITIES. There is also a number of example ABAP code snipts to help you use the functionality of this method.
This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name CL_ABAP_MEMORY_UTILITIES into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Static
This is a Static Method so you can call it directlyThe following technical details of method GET_MEMORY_SIZE_OF_OBJECT can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method GET_MEMORY_SIZE_OF_OBJECT
.| Name | Type | Data Type | Description | Default Value |
| IGNORE_STRING_SHARING | Importing | TYPE C | Flag to Indicate Whether String Sharing Is Ignored | |
| IGNORE_TABLE_SHARING | Importing | TYPE C | Flag to Indicate Whether Table Sharing Is Ignored | |
| OBJECT | Importing | TYPE ANY | Object to be calculated | |
| BOUND_SIZE_ALLOC | Exporting | TYPE ABAP_MSIZE | Size of Bound and Allocated Memory | |
| BOUND_SIZE_USED | Exporting | TYPE ABAP_MSIZE | Size of Bound and Used Memory | |
| IS_IN_SHARED_MEMORY | Exporting | TYPE C | Flag to Indicate Whether OBJECT Is in Shared Memory. | |
| IS_PART_OF_NON_TRIVIAL_SZK | Exporting | TYPE C | Strongly Connected Component (SCC) of Object | |
| LOW_MEM | Exporting | TYPE C | Flag Whether Only bound_size_* are filled (Memory Shortage) | |
| REFERENCED_SIZE_ALLOC | Exporting | TYPE ABAP_MSIZE | Size of Referenced and Allocated Memory | |
| REFERENCED_SIZE_USED | Exporting | TYPE ABAP_MSIZE | Size of Referenced and Used Memory | |
| SIZEOF_ALLOC | Exporting | TYPE ABAP_MSIZE | Size of the Allocated Repository without Children | |
| SIZEOF_USED | Exporting | TYPE ABAP_MSIZE | Size of the Repository Used without Children | |
| SZK_SIZE_ALLOC | Exporting | TYPE ABAP_MSIZE | Size of Allocated Memory of SCC | |
| SZK_SIZE_USED | Exporting | TYPE ABAP_MSIZE | Size of Used Memory of SCC |
Exceptions of Method GET_MEMORY_SIZE_OF_OBJECT
This method does not have any exceptionsExample ABAP coding
DATA: lv_BOUND_SIZE_ALLOC TYPE ABAP_MSIZE,
lv_BOUND_SIZE_USED TYPE ABAP_MSIZE,
lv_IGNORE_STRING_SHARING TYPE C,
lv_IGNORE_TABLE_SHARING TYPE C,
lv_IS_IN_SHARED_MEMORY TYPE C,
lv_IS_PART_OF_NON_TRIVIAL_SZK TYPE C,
lv_LOW_MEM TYPE C,
lv_OBJECT TYPE ANY,
lv_REFERENCED_SIZE_ALLOC TYPE ABAP_MSIZE,
lv_REFERENCED_SIZE_USED TYPE ABAP_MSIZE,
lv_SIZEOF_ALLOC TYPE ABAP_MSIZE,
lv_SIZEOF_USED TYPE ABAP_MSIZE,
lv_SZK_SIZE_ALLOC TYPE ABAP_MSIZE,
lv_SZK_SIZE_USED TYPE ABAP_MSIZE,
lv_other TYPE c.
CALL METHOD CL_ABAP_MEMORY_UTILITIES=>GET_MEMORY_SIZE_OF_OBJECT(
EXPORTING
IGNORE_STRING_SHARING = lv_IGNORE_STRING_SHARING
IGNORE_TABLE_SHARING = lv_IGNORE_TABLE_SHARING
OBJECT = lv_OBJECT
IMPORTING
BOUND_SIZE_ALLOC = lv_BOUND_SIZE_ALLOC
BOUND_SIZE_USED = lv_BOUND_SIZE_USED
IS_IN_SHARED_MEMORY = lv_IS_IN_SHARED_MEMORY
IS_PART_OF_NON_TRIVIAL_SZK = lv_IS_PART_OF_NON_TRIVIAL_SZK
LOW_MEM = lv_LOW_MEM
REFERENCED_SIZE_ALLOC = lv_REFERENCED_SIZE_ALLOC
REFERENCED_SIZE_USED = lv_REFERENCED_SIZE_USED
SIZEOF_ALLOC = lv_SIZEOF_ALLOC
SIZEOF_USED = lv_SIZEOF_USED
SZK_SIZE_ALLOC = lv_SZK_SIZE_ALLOC
SZK_SIZE_USED = lv_SZK_SIZE_USED ).
Links to Related Class(s)
CL_ABAP_...Full list of available SAP object classes
Search for further information about these or an SAP related objects