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

delete parameter id

former_member224404
Active Participant
0 Likes
4,132

Hi team,

I am exporting a varitable to SAP memory

by

set paramer id 'ZCODE' field l_v_code.

Then I am getting the parameter value in another program by

get parameter id 'ZCODE' field l_v_code.

After that I want to clear the content of parameter ID

or remove it from memory. Please suggest me some ways to do that.

Thanks,

Mainak

1 ACCEPTED SOLUTION
Read only

former_member224404
Active Participant
0 Likes
1,863

Hi Eric,

I have used Free memory id but it's not clearing the value of my parameter id. it is returing sy-subrc 4.

12 REPLIES 12
Read only

bpawanchand
Active Contributor
0 Likes
1,863

HI

by using FREE statement you can free up or deallocate the memory

use FREE <memory id>

regards

Pavan

Read only

Former Member
0 Likes
1,863

you have to use the FREE

FREE MEMORY ID pid.

Read only

Former Member
0 Likes
1,863

Hi Mainak,

I Think you can use FREE Keyword.

FREE MEMORY [ID <key>].

Please check this link

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3beb358411d1829f0000e829fbfe/content.htm

Best regards,

raam

Read only

former_member224404
Active Participant
0 Likes
1,863

Thanks all. I have got my answer.

Read only

former_member224404
Active Participant
0 Likes
1,863

free statment deletes abap memory id but not sap memory id.

Read only

0 Likes
1,863

yes, replies are a bit confusing here...

in your case you have to use:

SET PARAMETER ID 'ZCODE' FIELD space.

But it is better to use (instead of SET/GET PARAMETER ID ...) the IMPORT and EXPORT commands. after these you can use the FREE command (as other susggested).

EXPORT l_v_code TO MEMORY ID 'ZCODE'

than:

IMPORT l_v_code FROM MEMORY ID 'ZCODE.

finally:

FREE MEMORY ID 'ZCODE'.

Read only

former_member224404
Active Participant
0 Likes
1,864

Hi Eric,

I have used Free memory id but it's not clearing the value of my parameter id. it is returing sy-subrc 4.

Read only

0 Likes
1,863

As Eric has suggested, try using the SET statement, and set the value to initial.

SET PARAMETER ID 'ZCODE' FIELD space.

Regards,

Rich Heilman

Read only

0 Likes
1,863

you did not understand what I wrote....

I copy here again the simple solution for your problem:

"in your case you have to use:

SET PARAMETER ID 'ZCODE' FIELD space."

(on the other hand if the FREE MEMORY ID does not work, why did you assign points for those answers?)

Read only

Former Member
0 Likes
1,863

You can only Reset.

REPORT  ztest_parme.

DATA: vbeln TYPE vbeln,
      vbeln2 TYPE vbeln.

vbeln = '213342'.

SET PARAMETER ID 'AUN' FIELD vbeln.

GET PARAMETER ID 'AUN' FIELD vbeln2.
IF sy-subrc EQ 0.
  WRITE vbeln2.
  CLEAR vbeln.
  "Restting is the way..after getting the value
  SET PARAMETER ID 'AUN' FIELD vbeln.
ENDIF.
*-Now we will check the value again
GET PARAMETER ID 'AUN' FIELD vbeln2.
IF sy-subrc EQ 0. "no value will be there
  WRITE vbeln2.
ENDIF

Read only

0 Likes
1,863

This message was moderated.

Read only

vinodkumar_thangavel
Participant
0 Likes
1,863

Hi,

Try using FREE MEMORY ID and clear the same.

Regards,

Vinodkumar.