07-22-2008 12:40 PM
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
07-25-2008 2:13 PM
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.
07-22-2008 12:41 PM
HI
by using FREE statement you can free up or deallocate the memory
use FREE <memory id>
regards
Pavan
07-22-2008 12:43 PM
07-22-2008 12:46 PM
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
07-22-2008 1:03 PM
07-25-2008 2:05 PM
07-25-2008 2:09 PM
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'.
07-25-2008 2:13 PM
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.
07-25-2008 2:16 PM
07-25-2008 2:16 PM
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?)
07-25-2008 2:17 PM
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
01-22-2015 9:01 AM
01-22-2015 9:05 AM
Hi,
Try using FREE MEMORY ID and clear the same.
Regards,
Vinodkumar.