Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Clear sap memory

Former Member
0 Likes
6,119

Hi,

How to clear or free the sap memory during the run time?

I have tried few scenarios.

REPORT  ZSAP_MEMORY.

DATA : VALUE1(30) TYPE C VALUE 'SAP MEMORY'.

PARAMETER : MATNR TYPE MARA-MATNR.

SET PARAMETER ID 'MEM' FIELD VALUE1.

FREE MEMORY ID 'MEM'.

DELETE FROM MEMORY ID 'MEM'.


I have tried this below method using space, it is working fine. but i am sure this is  not the correct way.

SET PARAMETER ID 'MEM' FIELD ' '.


please suggest.

Regards,

MOHANA


Hi,

How to clear or free the sap memory during the run time?

I have tried few scenarios.

REPORT  ZSAP_MEMORY.

DATA : VALUE1(30) TYPE C VALUE 'SAP MEMORY'.

PARAMETER : MATNR TYPE MARA-MATNR.

SET PARAMETER ID 'MEM' FIELD VALUE1.

FREE MEMORY ID 'MEM'.

DELETE FROM MEMORY ID 'MEM'.


I have tried this below method using space, it is working fine. but i am sure this is  not the correct way.

SET PARAMETER ID 'MEM' FIELD ' '.


please suggest.

Regards,

MOHANA


5 REPLIES 5
Read only

former_member192467
Active Participant
0 Likes
3,814

Hi,

You can clear the field value and SET again..

Clear: lv_field

SET PARAMETER ID 'MEM' field lv_field.

Read only

former_member184158
Active Contributor
0 Likes
3,814

Hi

You can clear the value of the parameter

SET parameter ID 'MEM' field SPACE.


Regards


Read only

Flavio
Active Contributor
0 Likes
3,814

Hi Mohana,

I'm usually preferring the

EXPORT value1 TO MEMORY ID 'MEM'.


statement, instead of the   SET PARAMETER ID 'MEM' FIELD value1.



After that, to clear the ABAP memory, I'm using


DELETE FROM MEMORY ID 'MEM'.



Thanks and regards,


Flavio

Read only

Former Member
0 Likes
3,814

as per my requirement I would like to use only sap memory not abap memory

let me know how to clear sap memory?

Read only

Flavio
Active Contributor
0 Likes
3,814

Hi Mohana,

I see.... sorry for the misunderstanding.

I would then use SET PARAMETER ID 'MEM' FIELD space.

Thanks and regards,

Flavio