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

remote-enabled module

Former Member
0 Likes
3,463

iam creted oan function module(bapi) ,in the attributes iam taken remote enabled module. when i acti vate this mouduel iam geting this message.

Reference parameters are not allowed with rfc.

how can i activate it

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
2,492

As already said a couple of times, you must mark the parameters as "Call by value".

Per default, parameters are passed by reference. This means only the memory address where the current value is located is passed to the function. This is very efficient as no copy of values takes place. But this only works if the called function/method/form tuns in the same work process on the same system.

Remote-enabled means that the function may be called from anywhere. Implicitly, no direct access to the current memory is given and so the call by reference can never work.

Marking parameter as "call by value" means that the data passed is copied to/from a local variable.

Regards,

Clemens

P.S.: It is always helpful to look at the message long text:

Diagnosis

     You have defined a reference parameter for a remotely called function

     module. However, only value parameters are allowed in this kind of

     function module.

11 REPLIES 11
Read only

Former Member
0 Likes
2,492

in the import & Export parameters , check the check-box "Pass by value"

Read only

bpawanchand
Active Contributor
0 Likes
2,492

Hi

In the RFC enable or check the PASS BY VALUE option for each exporting and importing parametrs.

Regards

Pavan

Read only

former_member673464
Active Contributor
0 Likes
2,492

hi,

refer the following documentation for your query.

Parameter Handling in Remote Calls

When you make a remote function call, the system handles parameter transfer differently than it does with local calls.

TABLES parameters

The actual table is transferred, but not the table header. If a table parameter is not specified, an empty table is used in the called function.

The RFC uses a delta managing mechanism to minimize network load during parameter and result passing. Internal ABAP tables can be used as parameters for function module calls. In a local function module call, a parameter table is passed on by reference, and no new local copy has to be created. RFC does not support the "by reference" mechanism, so the whole table has to be exchanged between the RFC client and the RFC server. When the RFC server receives the table entries, it creates a local copy of the internal table. Then only delta information is returned to the RFC client. This information is not returned to the RFC client every time a table operation occurs, however; instead, all collected delta information is passed on at once when the function returns to the client.

The first time a table is passed, it is given an object-ID and registered as a "virtual global table" in the calling system. This registration is kept alive as long as call-backs are possible between calling and called systems. Thus, if multiple call-backs occur, the change-log can be passed back and forth to update the local copy, but the table itself need only be copied once (the first time).

regards,

Veeresh

Read only

former_member217544
Active Contributor
0 Likes
2,492

Hi,

You need to select the check box "pass value" present in the IMPORT, EXPORT tabs for all the parameters of the Function Module.

Hope this will help.

Regards,

Swarna Munukoti.

Read only

Former Member
0 Likes
2,492

Hi,

go to SE37

select the radio button RFC enabled module.

provide the import and expport parameters for the function module.

while doing that select the checkbox PASS VALUE for the parameters which you are declaring in it.

write the logic in Source code.

Activate it and use it.

Hope this will solve your problem,

Regards,

Harish

Read only

Former Member
0 Likes
2,492

hi,

U cannot pass the parameters by reference here. So, u need to pass it by value. For this reason, select the otion 'Pass by Value'.

Hope this will help u.

Regards,

Aleem.

Read only

Former Member
0 Likes
2,492

thanku friends my problem is solved

Read only

Former Member
0 Likes
2,492

Thank u friends my problem also solved...

Read only

Clemenss
Active Contributor
0 Likes
2,493

As already said a couple of times, you must mark the parameters as "Call by value".

Per default, parameters are passed by reference. This means only the memory address where the current value is located is passed to the function. This is very efficient as no copy of values takes place. But this only works if the called function/method/form tuns in the same work process on the same system.

Remote-enabled means that the function may be called from anywhere. Implicitly, no direct access to the current memory is given and so the call by reference can never work.

Marking parameter as "call by value" means that the data passed is copied to/from a local variable.

Regards,

Clemens

P.S.: It is always helpful to look at the message long text:

Diagnosis

     You have defined a reference parameter for a remotely called function

     module. However, only value parameters are allowed in this kind of

     function module.

Read only

Former Member
0 Likes
2,492

Hi Admin,

The asnwers are true..

You sould change status be " answered "...

Thks this acticle very helpfull.

arif

Read only

Former Member
0 Likes
2,492

If you are using RFC then Pass by reference wont support only pass by value(means which can be accessed from outside SAP)

Regards,

Vadamalai A