Skip to Content
author's profile photo Former Member
Former Member

changing or using?

Hi all,

Is any one of them obsolete/not preferred when writing a subroutine?

Thanks,

Charles.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 01:32 AM

    USING is preferred. CHANGING is obsolete.

    USING performs both operations.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 01:51 AM

    USING is preferred in subroutines.

    For more info, please refer below link:

    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db984635c111d1829f0000e829fbfe/content.htm

    Thanks,

    Santos

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 02:36 AM

    HI,

    You can you any of them, but its better if you are going to pass any value to a FM and return back the changed value use it through CHANGING, if you just want to pass it to the FM, use USING.

    Regards

    Subramanian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 02:58 AM

    The link provided by Santos gives the detail.

    In summary:

    - If the form definition has a parameter USING VALUE(p_var1) then any changes will NOT be passed back to the caller.

    - Any other parameter definitions will result in changes being passed back to the caller.

    - For readability, if the form is going to pass back a changed value for a parameter, then you should use a CHANGING parameter.

    - The TABLES parameter is obsolete. You should use a using/changing parameter with a table type.

    Regards

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.