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

Sub-routines

Hi SAP gurus,

Can any one explain me the sub-routine using the formal parameters using and changing such as "PERFORM SAMPLE USING a CHANGING b" .

Please explain me with an simple example.

Vishnu.

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 Dec 04, 2007 at 08:11 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2007 at 08:15 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 02:39 AM

    when refer passing,they using is the same as changing

    but value passing is different,using is only value passing and changing is value and

    resault passing,

    maybe this can help you!

    REPORT z_szq_test.

    DATA:inter1 TYPE i,

    inter2 TYPE i,

    sum TYPE i.

    START-OF-SELECTION.

    inter1 = 2.

    inter2 = 6.

    PERFORM sum USING: inter1

    inter2

    sum.

    WRITE:/ sum LEFT-JUSTIFIED.

    CLEAR:sum.

    PERFORM sum1 CHANGING inter1

    inter2

    sum.

    WRITE:/ sum LEFT-JUSTIFIED.

    ----


    • FORM sum *

    ----


    • ........ *

    ----


    • --> P_INT1 *

    • --> P_INT2 *

    • --> P_SUM *

    ----


    END-OF-SELECTION.

    ----


    • FORM sum *

    ----


    • ........ *

    ----


    • --> : *

    • --> P_INT1 *

    • --> P_INT2 *

    • --> P_SUM *

    ----


    FORM sum USING: value(p_int1)

    value(p_int2)

    value(p_sum).

    p_sum = p_int1 + p_int2.

    ENDFORM.

    ----


    • FORM sum *

    ----


    • ........ *

    ----


    • --> : *

    • --> P_INT1 *

    • --> P_INT2 *

    • --> P_SUM *

    ----


    FORM sum1 CHANGING value(p_int1)

    value(p_int2)

    value(p_sum).

    p_sum = p_int1 + p_int2.

    WRITE:/ 'the inner output',p_sum.

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 02:49 AM

    HI

    Check the F1 help for Perform,

    You will get the xplanation with examples .

    Thanks

    Praveen

    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.