Purpose
Accept an incoming connection, console version.
Syntax
void Accept(char** argv);
Parameters
argv
: The command line string containing the logon information. There are two ways to define argv:– argv[0]: -D<destination pointed to an entry in 'saprfc.ini'>
– argv[1]: -t Set RFC-Trace on.
– argv[0]: -a<program ID> e.g. own_host_name.program_name
– argv[1]: -g<host name of the SAP gateway>
– argv[2]: -s<service of the SAP gateway>, e.g. sapgw00
– argv[3]: -t Set RFC-Trace on
We recommend the first way since you can use some RFC features today and will not need to make any changes in your RFC programs. See help on saprfc.ini for details.
The first 3 parameters in the above second way must fit with the configuration in R/3. (Under transaction SM59, connection type T and register mode)
Use at least the host name of the computer where your RFC server program is running as a part of the program ID along with the program name to avoid name conflicts at the SAP gateway.
Exceptions
Throws RFC_ERROR_INFO for connect failures.
Description
This function accepts an incoming connection and has to be used, if the program was started by an RFC call issued by an R/3 system or an other program using this API. The command line (argv) has to be passed to this function.
With Release 3.0C onwards this function can be used to register at an SAP gateway and the server program can wait for the next RFC request by invoking the Run member function of the CRfcServerApp object.
Using this functionality an RFC server program can now already run and work as an RFC daemon. A start of any server program by an R/3 application server, by SAPGUI or via remote shell by an SAP gateway is no longer necessary.
Related Information
Connect SafeConnect Open SafeOpen Accept (Windows Version) ConnArgv