on 06-04-2007 5:45 AM
Hi all,
I need to create a RFC Function module, I have the RFC destination given, May I know any further seetings needed for a RFC Function Module.
Thanks
Mungala.
Hi,
There is no much difference between normal Function Module.But after developing a FM, to make it RFC enabled you have to take care of the following things:
1. In attributes click the radiobutton 'REMOTE ENABLED' .
2. Pass all the parameters by 'Pass By Value' .
Regards,
Padmam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mungala,
Please checkout the below URL
http://help.sap.com/saphelp_nw04/helpdata/en/22/042537488911d189490000e829fbbd/frameset.htm
CALL FUNCTION - RFC (RFC Variants)
Synchronous RFC
1. CALL FUNCTION func DESTINATION dest
parameter_list.
Asynchronous RFC
2. CALL FUNCTION func STARTING NEW TASK task
parameter_list
Transactional RFC
3. CALL FUNCTION func IN BACKGROUND TASK
parameter_list
======================
Displaying, Maintaining, and Testing Destinations
To display, create, or change destinations, choose the following from the SAP menu: Tools ® Administration ® Administration ® Network ® RFC Destinations (transaction SM59).
Remote destinations are stored in the table RFCDES. The table RFCDES describes logical destinations for remote function calls (RFCs). You cannot maintain the table RFCDES directly.
http://help.sap.com/saphelp_nw04/helpdata/en/22/042537488911d189490000e829fbbd/frameset.htm
Thanks,
Aby Jacob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
<b>RFC ( Remote Function calls )</b>
A remote function call is a call to a function module running in a system different from the caller's. The remote function can also be called from within the same system (as a remote call).
RFC consists of two interfaces : A calling interface for ABAP Programs and a calling interface for Non-SAP programs.
Any ABAP program can call a remote function using the CALL FUNCTION...DESTINATION statement. The DESTINATION parameter tells the SAP System that the called function runs in a system other than the caller's.
<b>RFC CLIENT and RFC SERVER</b>
RFC client is the instance that calls up the Remote Function Call to execute the function that is provided by an RFC server.
The RFC Interface takes care of :-
- Converting all parameter data to the representation needed in the remote system
Calling the communication routines needed to talk to the remote system.
Handling communications errors, and notifying the caller, if desired ( using EXCEPTIONS paramater of the CALL FUNCTION).
<b>Calling Remote function modules</b>
You can use the CALL FUNCTION statement to call remote functions by including an additional DESTINATION clause.
CALL FUNCTION remotefunction
DESTINATION dest
EXPORTING f1 =
IMPORTING f2 =
TABLES t1 =
EXCEPTIONS
The field dest can be either a literal or a variable. Logical destinations are defined in the RFCDES table via transaction SM59 or via the menu path: Tools ->Administration,Administration->Network->RFC destinations.
<b>Calling remote functions locally :-</b>( i.e. call a remote function within the same system )
The two options to do this are
CALL FUNCTION...DESTINATION = 'NONE'
CALL FUNCTION... [no DESTINATION used]
<b>Calling remote function modules BACK :-</b>
The remote function can invoke its own caller (if the caller is itself a function module), or any function module loaded with the caller.
You can trigger this call-back mechanism using
CALL FUNCTION... DESTINATION 'BACK.
<b>Types of RFCs</b>
Synchronous RFC The calling program continues the execution only after the called function is complete.
Asynchronous RFC - The calling program continues the execution without waiting for return from the called function.
Eg: CALL FUNCTION remotefunction STARTING NEW TASK taskname.
Transactional RFC - The called function module is executed exactly once in the RFC server system.Each function call is seen as a transaction in the target system. Transactional RFCs use the suffix IN BACKGROUND TASK .
Eg : CALL FUNCTION remotefunction IN BACKGROUND TASK
<b>Writing remote function modules</b>
In the function module attributes tab (transaction code SE37), set the processing type as Remote-enabled module to create a remote function module.
Write the code for the function module.
Define the destination of the RFC server in the RFC client system that calls the remote function ( via SM59 transaction).
Declaring Parameters: All parameter fields for a remote function module must be defined as reference fields, that is, like ABAP Dictionary fields.
Exceptions: The system raises COMMUNICATION_FAILURE and SYSTEM_FAILURE internally. You can raise exceptions in a remote function just as you would in a locally called function.
<b>Debugging Remote function calls</b>
It is not possible to debug a remote function call to another system.
However, when testing ABAP-to-ABAP RFC calls, you can use the ABAP debugger to monitor the execution of the RFC function in the remote system.
With remote calls, the ABAP debugger (including the debugging interface) runs on the local system. Data values and other run information for the remote function are passed in from the remote system.
regards
ravish
<b>plz dont forget to reward points if helpful</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
While you are creating Function module,it attributes make it as Remote Enabled call.
Go to Tcode SM59 and configure the settings.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.