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

Doubt in Function module

Hi,

By default, import, export param - pass by value .

changing - pass by value and change

table - pass by ref

Then what is the use of pass value check box. can you explain.

With thanks,

senthilkumar.R

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 08:50 AM

    You pass the parameter with values. This means that the parameter contents are copied both when the parameter is passed and when it is transferred back to the calling parameter. For structures that contain tables, performance may be reduced considerably. Therefore, you should not do this.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 08:59 AM

    this is a mechanism how data s transferred.

    pass by value - system copies value to the variables which are at different locations in memory

    pass by ref : shares the same memory

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 09:00 AM

    Hi,

    we can pass the values by two types

    1. pass by value

    2. pass by reference

    if the check box is checked then it will take it as pass by value other wise it will take it as pass by reference.

    reward points if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 09:00 AM

    Hi Senthil,

    Check these link for info in your query:

    Function Module

    function module

    Reward if helpful.

    Message was edited by:

    Esha Raj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 09:02 AM

    This "Pass by value" check box will tell your function module to get the values of the parameter which you are passing to it...

    for example....

    if you are having a parameter pm1 in your fm....

    while calling you will give pm1 = myprgvar1.

    in your program myprgvar1 may have value 5....

    So your fm parameter pm1 will take that value 5 while calling...

    And it is recommended not to use this functionality for tables....because of performances issues...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 23, 2007 at 09:07 AM

    hi ,

    check the description below :

    Pass by value:

    a local object with the same data type as the corresponding actual parameter is created in the function module and filled with its values. A change to the formal parameter in the FM does not change the value of the actual parameter. The actual parameter also retains its original value even after the FM has ended.

    Regards,

    Ranjita

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 09:13 AM

    pass by value:

    You pass the parameter with values. This means that the parameter contents are copied both when the parameter is passed and when it is transferred back to the calling parameter.

    pass by reference

    The table parameters are internal tables. Internal tables are treated like changing parameters and are always pass by reference.

    Rewards if useful.

    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.