‎2007 Apr 10 10:32 AM
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.
‎2007 Apr 10 10:34 AM
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
‎2007 Apr 10 10:34 AM
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
‎2007 Apr 10 10:35 AM
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
‎2007 Apr 10 10:36 AM
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>
‎2007 Apr 10 10:37 AM
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.
‎2007 Apr 10 10:40 AM
hi check this out,
CALLFUNCTION function name DESTINATION system (in which u created function module)
‎2007 Apr 10 10:42 AM
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>
‎2007 Apr 10 12:44 PM
‎2008 May 04 5:57 PM
What is mean by Function module, sample code for to retrieve data from two data base.