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

SAP Memory

john_wayne
Participant
0 Likes
607

Im having trouble clearing the sap memory. so far ive tried using

FREE MEMORY ID 'TKT'.

SET PARAMETER ID 'TKT' FIELD SPACE.

DELETE FROM MEMORY ID 'TKT'.

all of this does not clear the memory at all when i get the memory again it should be empty but it still return the previous value.

my current logic is i read the memory and calls screen 9000 and then when i press back i go back to the previous screen it reads the sap memory and there is previous data and it calls the screen 9000.

4 REPLIES 4
Read only

Former Member
0 Likes
570

z_clear = ''. (or any variable)

SET PARAMETER ID 'TKT' FIELD z_clear.

Read only

Sandra_Rossi
Active Contributor
0 Likes
570

Hi abaperdaft,

you made confusion in your attempts to clear the memory, because you tried to clear 2 kind of memories : SAP memory (statements SET and GET PARAMETER ID), and ABAP memory (statements containing "MEMORY ID").

I guess TKT is a SET-GET parameter as 3-letter names are often used for that.

So, what you did (SET PARAMETER ID 'TKT' FIELD space) is correct : it doesn't delete the memory, but clears it. It's 99% of the time sufficient. You could really delete it (see how to delete it in note 62440 - Undo SET PARAMETER not possible), but I think this will not solve the issue.

Are you really sure that the program doesn't get the value from a database table, screen variant, etc.?

Best regards,

Sandra

Read only

0 Likes
570

The value for the sap memory is populated when i click on the hotspot of the alv then i set the parameter for the sap memory. how come when i set it to space it does not actually sets it to space but still retains the previous value before setting to space?

Read only

0 Likes
570

Hi abaperdaft,

Make sure other programs don't change it after you, by adding a breakpoint at statement "SET PARAMETER" (use F9 key from the debugger to add this special kind of breakpoint).

Moreover (1), is there a screen displayed (other than the ALV you mention) after you have set the parameter? (in that case, the SAP memory can be changed if there's an input field is linked to TKT as a SET parameter, or if there's a screen variant...)

Moreover (2), it could also be changed if you enter a screen in another mode of your SAPGUI, as the SAP memory is shared between all modes opened behind the same login.

Sandra