Application Development and Automation 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: 
Read only

Doubt in Function module

srajendran
Explorer
0 Likes
1,483

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
Read only

Former Member
0 Likes
1,362

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.

Read only

0 Likes
1,362

Hi Sharayu Kumatkar ,

I can't understand. can you expain pls.

Read only

0 Likes
1,362

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

Read only

Former Member
0 Likes
1,362

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

Read only

0 Likes
1,362

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

Read only

Former Member
0 Likes
1,362

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.

Read only

Former Member
0 Likes
1,362

Hi Senthil,

Check these link for info in your query:

Reward if helpful.

Message was edited by:

Esha Raj

Read only

Former Member
0 Likes
1,362

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

Read only

former_member196299
Active Contributor
0 Likes
1,362

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

Read only

Former Member
0 Likes
1,362

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.