SAP SAPTUNE_MEMORY_PARAMETER_WRITE Function Module for Change the SAP Memory Management Parameters









SAPTUNE_MEMORY_PARAMETER_WRITE is a standard saptune memory parameter write SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Change the SAP Memory Management Parameters processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for saptune memory parameter write FM, simply by entering the name SAPTUNE_MEMORY_PARAMETER_WRITE into the relevant SAP transaction such as SE37 or SE38.

Function Group: STUB
Program Name: SAPLSTUB
Main Program: SAPLSTUB
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SAPTUNE_MEMORY_PARAMETER_WRITE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'SAPTUNE_MEMORY_PARAMETER_WRITE'"Change the SAP Memory Management Parameters
EXPORTING
* SIZE_HEAP_DIA = -1 "Total Heap Memory Available for Dialog WPs [Bytes]
* SIZE_HEAP_NONDIA = -1 "Total Heap Memory Available for Non-Dialog WPs [Bytes]
* SIZE_HEAP_TOTAL = -1 "Total heap memory available [Bytes]
* EM_STAT_LOG_TIMEOUT = -1 "Write Time for EM Statistics Log [min]
* EM_STAT_LOG_SIZE = -1 "Size of the EM Statistics Log [MB]

TABLES
* ALLOC_PROCEDURE_DIA = "ABAP Memory Allocation Procedure for Dialog
* ALLOC_PROCEDURE_NONDIA = "ABAP Memory Allocation Procedure for Non-Dialog

EXCEPTIONS
INCONSISTENT_PARAMETERS = 1 MEMORY_MODEL_NOT_IN_USE = 2 NO_AUTHORIZATION = 3
.



IMPORTING Parameters details for SAPTUNE_MEMORY_PARAMETER_WRITE

SIZE_HEAP_DIA - Total Heap Memory Available for Dialog WPs [Bytes]

Data type: MEMPARAMTY-SIZ_HP_DIA
Default: -1
Optional: Yes
Call by Reference: No ( called with pass by value option)

SIZE_HEAP_NONDIA - Total Heap Memory Available for Non-Dialog WPs [Bytes]

Data type: MEMPARAMTY-SIZ_HP_OTH
Default: -1
Optional: Yes
Call by Reference: No ( called with pass by value option)

SIZE_HEAP_TOTAL - Total heap memory available [Bytes]

Data type: MEMPARAMTY-SIZ_HP_TTL
Default: -1
Optional: Yes
Call by Reference: No ( called with pass by value option)

EM_STAT_LOG_TIMEOUT - Write Time for EM Statistics Log [min]

Data type: MEMPARAMTY-TIM_EM_LOG
Default: -1
Optional: Yes
Call by Reference: No ( called with pass by value option)

EM_STAT_LOG_SIZE - Size of the EM Statistics Log [MB]

Data type: MEMPARAMTY-SIZ_EM_LOG
Default: -1
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SAPTUNE_MEMORY_PARAMETER_WRITE

ALLOC_PROCEDURE_DIA - ABAP Memory Allocation Procedure for Dialog

Data type: MEMALLOC
Optional: Yes
Call by Reference: No ( called with pass by value option)

ALLOC_PROCEDURE_NONDIA - ABAP Memory Allocation Procedure for Non-Dialog

Data type: MEMALLOC
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

INCONSISTENT_PARAMETERS - Parameter default values are contradictory

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MEMORY_MODEL_NOT_IN_USE - Extended memory model is not in use

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_AUTHORIZATION - No authorization to change memory parameters

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for SAPTUNE_MEMORY_PARAMETER_WRITE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_size_heap_dia  TYPE MEMPARAMTY-SIZ_HP_DIA, "   -1
lt_alloc_procedure_dia  TYPE STANDARD TABLE OF MEMALLOC, "   
lv_inconsistent_parameters  TYPE MEMALLOC, "   
lv_size_heap_nondia  TYPE MEMPARAMTY-SIZ_HP_OTH, "   -1
lt_alloc_procedure_nondia  TYPE STANDARD TABLE OF MEMALLOC, "   
lv_memory_model_not_in_use  TYPE MEMALLOC, "   
lv_size_heap_total  TYPE MEMPARAMTY-SIZ_HP_TTL, "   -1
lv_no_authorization  TYPE MEMPARAMTY, "   
lv_em_stat_log_timeout  TYPE MEMPARAMTY-TIM_EM_LOG, "   -1
lv_em_stat_log_size  TYPE MEMPARAMTY-SIZ_EM_LOG. "   -1

  CALL FUNCTION 'SAPTUNE_MEMORY_PARAMETER_WRITE'  "Change the SAP Memory Management Parameters
    EXPORTING
         SIZE_HEAP_DIA = lv_size_heap_dia
         SIZE_HEAP_NONDIA = lv_size_heap_nondia
         SIZE_HEAP_TOTAL = lv_size_heap_total
         EM_STAT_LOG_TIMEOUT = lv_em_stat_log_timeout
         EM_STAT_LOG_SIZE = lv_em_stat_log_size
    TABLES
         ALLOC_PROCEDURE_DIA = lt_alloc_procedure_dia
         ALLOC_PROCEDURE_NONDIA = lt_alloc_procedure_nondia
    EXCEPTIONS
        INCONSISTENT_PARAMETERS = 1
        MEMORY_MODEL_NOT_IN_USE = 2
        NO_AUTHORIZATION = 3
. " SAPTUNE_MEMORY_PARAMETER_WRITE




ABAP code using 7.40 inline data declarations to call FM SAPTUNE_MEMORY_PARAMETER_WRITE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single SIZ_HP_DIA FROM MEMPARAMTY INTO @DATA(ld_size_heap_dia).
DATA(ld_size_heap_dia) = -1.
 
 
 
"SELECT single SIZ_HP_OTH FROM MEMPARAMTY INTO @DATA(ld_size_heap_nondia).
DATA(ld_size_heap_nondia) = -1.
 
 
 
"SELECT single SIZ_HP_TTL FROM MEMPARAMTY INTO @DATA(ld_size_heap_total).
DATA(ld_size_heap_total) = -1.
 
 
"SELECT single TIM_EM_LOG FROM MEMPARAMTY INTO @DATA(ld_em_stat_log_timeout).
DATA(ld_em_stat_log_timeout) = -1.
 
"SELECT single SIZ_EM_LOG FROM MEMPARAMTY INTO @DATA(ld_em_stat_log_size).
DATA(ld_em_stat_log_size) = -1.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!