Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in Function module

srajendran
Explorer
0 Kudos

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

10 REPLIES 10

Former Member
0 Kudos

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.

0 Kudos

Hi Sharayu Kumatkar ,

I can't understand. can you expain pls.

0 Kudos

My question is, by default import param is pass by value then what is the use of pass value check box.

Former Member
0 Kudos

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

0 Kudos

my question is by default import param is pass by value then what is the use of pass value check box.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Senthil,

Check these link for info in your query:

Reward if helpful.

Message was edited by:

Esha Raj

Former Member
0 Kudos

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

former_member196299
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.