06-26-2007 7:46 AM
06-26-2007 7:48 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;
See the table RFCDES for the RFC data
Refer this link:
http://help.sap.com/saphelp_nw04/helpdata/en/22/042518488911d189490000e829fbbd/frameset.htm
check out the following link it might help you
http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCFESDE2/BCFESDE2.pdf
Reward points for useful Answers
Regards
Anji
06-26-2007 7:56 AM
Hi,
Remote Communications: Remote Communications is a mechanism of connecting two systems or different configuration of the same system. Using this scheme we can communicate two systems having different architecture, protocols and functionality.
SAP systems provide three types of remote communications:
● Communications between two independent SAP systems.
Before calling function module a destination of called system must be created in the calling system.
● Client-Server Communications between an external client and an SAP system acting as server
● Client-Server communications between an SAP system acting as the client and an external server.
The RFC Interface
A remote function call (RFC) is the call of a function module that runs in a different system to the calling program. Although it is also possible to call a function module in the same system as an RFC, normally RFCs are used when the caller and the called function module run in the same system.
In the SAP system, these functions are provided by the RFC interface system. The RFC interface system enables function calls between two SAP systems, or between an SAP system and an external system.
The RFC- interface system is made up of the following interfaces:
Calling interface for ABAP programs
Each ABAP program can call a remote function module using the command CALL FUNCTION...DESTINATION. The parameter DESTINATION informs the SAP system that the called function module runs in a different system to the calling system. RFC communication with the remote system takes place as a part of the CALL FUNCTION command.
RFC function modules in an SAP system must be proper function modules and must be registered in the SAP system as remote.
If the calling program and the called program are both ABAP programs, the RFC interface provides both communication partners. The calling program can be any ABAP program, and the called program must be a function module that is registered as remote.
For more detailed information on calling function modules that are registered as remote, see Calling RFC Function Modules in ABAP.
For more information on writing function modules that you want to call remotely, see Writing RFC Function Modules in ABAP.
Interfaces for calling non-ABAP programs
If either the calling program or the called partner is not an SAP program, this program must be programmed in such a way that it can play the role of the other partner in RFC communication.
To support you when implementing RFC partner programs in non-SAP systems, read: Components of the SAP Communication Technology
RFC-supported and GUI-supported interfaces can be used by external programs to call function modules in SAP systems, and execute them in these systems. Likewise, ABAP programs can also use these interfaces to use functions supplied by external programs.
ALSO USE THE TCODE SM59 FOR CREATING THE DESTINATION ........
***do reward if usefulll
vijay
06-26-2007 7:59 AM
06-26-2007 8:02 AM
HI.
For the external function call, you can use the addition EXCEPTIONS of the statement CALL FUNCTION - RFC (RFC variants) to assign return values to the exceptions defined in the interface of the called function module. Class-based exceptions cannot be propagated to the caller from a remotely-called function module, and have the effect of an exception that cannot be processed.
In addition to the exceptions defined in the interface of the called function module, an external function call may trigger the following predefined exceptions:
· The exception SYSTEM_FAILURE occurs if a runtime error arises during execution of the remotely-called function module.
· The exception COMMUNICATION_FAILURE occurs if the connection cannot be made to the partner system, or if the connection is broken during communication.
We strongly recommend that you assign a return value to these two exceptions for each RFC, and that you process these, otherwise a runtime error may occur in the exception situations described.
Refer this link:
http://help.sap.com/saphelp_nw04/helpdata/en/22/042518488911d189490000e829fbbd/frameset.htm
check out the following link it might help you
http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCFESDE2/BCFESDE2.pdf
reward all helpfull answers.
regards.
Jay
06-26-2007 8:07 AM
may be i was wrong
i want to find out the RFC or bapi that log on the SAP?
06-28-2007 12:45 PM
Every rfc is acapable to logon to SAP.
You create the rfc in SM59 type 3; and there is a section called LOGON where you can fill in the LOGON settings.
So every remote enabled function module (attributes) is capable to logon to SAP.