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

How to create a Remote function call

Former Member
0 Likes
944

HI,

can you provide me with some blogs to create a remote function call ?

- import

- export

and finally a simple sourcecode.

Thx.

9 REPLIES 9
Read only

Former Member
0 Likes
911
Read only

Former Member
0 Likes
911

hi

r u asking to create rfc destination?

if not if already destination is maintained between the servers , use the following code.

data: wa_destination type gsval.

CASE sy-sysid.

WHEN <b>'ur present server name'.</b>

CONCATENATE <b>'destination server name'</b> 'CLNT' '025' INTO wa_destination.

then call function' function moduke name ' destination wa_destination

regards

karthik

Read only

0 Likes
911

Im not sure that your help is useful ?

I need the following.

Import:

Materialnumber(MATNR)

Export:

Description(PRODH)

I need to read the Table MVKE where MATNR = IMPORT-MATNR and return the MVKE-PRODH to the EXPORT Parameter.

Can you help me `?

Read only

0 Likes
911

Hi,

yes u can do that

for ur scenario u can do like this

first in the attributes of the FM ,make it as RFC enabled ,then

in import paramters declare matnr as IN_MATNR LIKE MARA-MATNR

in export parameters decalre prodh as OUT_PRODH LIKE MBKE-PRODH.

Now in the source code u have to do liek this

select prodh from mvke into OUT_PRODH up to 1 rows where matnr = in_matnr.

now in another system u ahve to call this function moudle as

DATA : V_MATNR LIKE MARA-MATNR,

V_PRODH LIKE MBKE-PRODH.

CALL FUNCTION 'ZFM' DESTINATION <DESTINATION NAME>

EXPORTING

MATNR = V_MATNR

IMPORTING

PRODH = V_PRODH.

Hope this helps

regards,

nagaraj

Read only

0 Likes
911

hi

u askd about normal function module, then y u confuse abt rfc.,,

just in ur soource code

data: loc_matnr type mvke-matnr.

select matnr from mvke into loc_matnr where matnr = matnr(import parametr)

prodh = matnr.

then execute , give the input and get the ouput as description

regards

karthik

Read only

0 Likes
911

that´s nice but there is an information window saying "You can´t use a referenceparameter, please choose a valueparameter"

any ideas ?

Read only

0 Likes
911

hi,

in Function Builder:

each import or export parameter of your FM can have the option "pass value" (checkbox)

which means "as copy" or "as reference", for RFC-FMs this is very important!

(performance...)

Read only

0 Likes
911

hi Gordon Breuer ,

just tick the check box of pass by value, in parameters, then u ll not get,

regards

karthik

*********reward points if useful