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 Function Call

Former Member
0 Likes
962

Hi Friends,

How to call a function in one system from another

system (Like..From R3X to R3S )?

I have already Craeted a FM (BAPI) in R3X and made it as Remote Enabled.

Now..From R3S, I have to call that FM and get the output.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
904

Hi..,

CALL FUNCTION - RFC

Syntax Forms

Synchroner RFC

1. CALL FUNCTION func DESTINATION dest

parameter_list.

Asynchroner RFC

2. CALL FUNCTION func STARTING NEW TASK task

[DESTINATION {dest|{IN GROUP {group|DEFAULT}}}]

parameter_list

[{PERFORMING subr}|{CALLING meth} ON END OF TASK].

Transaktionaler RFC

3. CALL FUNCTION func IN BACKGROUND TASK

[DESTINATION dest]

parameter_list

[AS SEPARATE UNIT].

<b>The destination contains the connection parameters for remote function calls. It contains the connection type, the target system and the partner program. Connections that affect SAP systems exclusively can be agreed as trustedsystems. RFC destinations are managed using transaction code SM59. </b>

regards,

sai ramesh

8 REPLIES 8
Read only

Former Member
0 Likes
905

Hi..,

CALL FUNCTION - RFC

Syntax Forms

Synchroner RFC

1. CALL FUNCTION func DESTINATION dest

parameter_list.

Asynchroner RFC

2. CALL FUNCTION func STARTING NEW TASK task

[DESTINATION {dest|{IN GROUP {group|DEFAULT}}}]

parameter_list

[{PERFORMING subr}|{CALLING meth} ON END OF TASK].

Transaktionaler RFC

3. CALL FUNCTION func IN BACKGROUND TASK

[DESTINATION dest]

parameter_list

[AS SEPARATE UNIT].

<b>The destination contains the connection parameters for remote function calls. It contains the connection type, the target system and the partner program. Connections that affect SAP systems exclusively can be agreed as trustedsystems. RFC destinations are managed using transaction code SM59. </b>

regards,

sai ramesh

Read only

Former Member
0 Likes
904

Hi,

RFC (Remote Function Call) is similar to the general SAP fun module: except that in the attributes you click the radio button: RFC enabled;

and you will be passing an Import parameter DESTINATION to it.

Other code and usage will be similar to any fun module;

Have a look at any fun module in SE37 to understand better about the different components of Fun modules;

Refer this link:

http://help.sap.com/saphelp_nw04/helpdata/en/22/042518488911d189490000e829fbbd/frameset.htm

reward points if useful

regards,

ANJI

Read only

Former Member
0 Likes
904

The FM has to be called via a destination. This destination is the RFC destination u create in SM59.

CALL FUNCTION '<fm>'

destination '<destination for R3x'

Importing

<import params>

exporting

<exp params>

tables

<tables params>

exceptions

<excp list>

Read only

Former Member
0 Likes
904

Hi,

In R3S, you have to create a RFC destination via SM59, where it should point to the ip address/host id of your R3X. This can be done by basis.

During the call in R3S, you have to code like below:

CALL FUNCTION 'TEST'

DESTINATION 'rfc_dest'

Bear in mind, 'rfc_dest' is the RFC destination that create via SM59 that mentioned above.

Hope it helps.

Read only

Former Member
0 Likes
904

hi check this out,

CALLFUNCTION function name DESTINATION system (in which u created function module)

Read only

Faaiez
Product and Topic Expert
Product and Topic Expert
0 Likes
904

Hi Rammohan

You would call the function module the same way you would call a function module normally. The only difference would be an additional line like this:

call function 'NAME OF FUNCTION'
        destination 'Logical name of R3X'...
        

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/22/042537488911d189490000e829fbbd/frameset.htm">See SAP Help for further details</a>

Read only

Former Member
0 Likes
904

Hi Guys..

Thank you all.

Read only

0 Likes
904

What is mean by Function module, sample code for to retrieve data from two data base.