Skip to Content
avatar image
Former Member

delete parameter id

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

8 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 25, 2008 at 01: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.

    Add comment
    10|10000 characters needed characters exceeded

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

  • avatar image
    Former Member
    Jul 22, 2008 at 11:46 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 22, 2008 at 11:41 AM

    HI

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

    use FREE <memory id>

    regards

    Pavan

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 22, 2008 at 11:43 AM

    you have to use the FREE

    FREE MEMORY ID pid.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 22, 2008 at 12:03 PM

    Thanks all. I have got my answer.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 25, 2008 at 01:05 PM

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

    Add comment
    10|10000 characters needed characters exceeded

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

  • Jul 25, 2008 at 01: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2015 at 09:05 AM

    Hi,

    Try using FREE MEMORY ID and clear the same.

    Regards,

    Vinodkumar.

    Add comment
    10|10000 characters needed characters exceeded