You must keep the following guidelines in mind when writing RFC programs.
The programs you write can call or be called by ABAP programs of an SAP system.
Technical Description
Supported Data and Transfer
Basic Functionality
Components of the RFC API
RFC Client Programs
RFC Server Programs
Passing Parameters
Writing an RFC Function in C
Using Multiple-Client Server Programs