Application Development 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: 

delete parameter id

former_member224404
Active Participant
0 Kudos

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

former_member224404
Active Participant
0 Kudos

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

bpawanchand
Active Contributor
0 Kudos

HI

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

use FREE <memory id>

regards

Pavan

former_member188685
Active Contributor
0 Kudos

you have to use the FREE

FREE MEMORY ID pid.

Former Member
0 Kudos

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

former_member224404
Active Participant
0 Kudos

Thanks all. I have got my answer.

former_member224404
Active Participant
0 Kudos

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

0 Kudos

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'.

former_member224404
Active Participant
0 Kudos

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.

0 Kudos

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

SET PARAMETER ID 'ZCODE' FIELD space.

Regards,

Rich Heilman

0 Kudos

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?)

former_member188685
Active Contributor
0 Kudos

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

0 Kudos

This message was moderated.

vinodkumar_thangavel
Participant
0 Kudos

Hi,

Try using FREE MEMORY ID and clear the same.

Regards,

Vinodkumar.