Show TOC

Syntax documentationRfcOpen Locate this document in the navigation structure

Use

The following function opens an RFC connection

RFC_HANDLE SAP_API RfcOpen(RFC_OPTIONS * options)

according to the given options and returns a handle for the connection established. The structure RFC_OPTIONS contains the data needed to open the connection:

Syntax Syntax

  1. typedef struct 
  2. {
  3. 	char *	destination;
  4. 	RFC_MODE	mode;
  5. 	void *	connopt;
  6. 	char *	client;
  7. 	char *	user;
  8. 	char *	password;
  9. 	char *	language;
  10. 	int	trace;
  11. }	
  12. RFC_OPTIONS;
End of the code.

This function is defined in SAPRFC.H.

Return Value:
  • Returns a handle to the RFC connection (RFC_HANDLE) or RFC_HANDLE_NULL if the connection cannot be opened.

Function Parameter:
  • options

    connection parameters as described at structure RFC_OPTIONS.

    Note Note

    If you call RfcOpen with an invalid password, the function does not immediately fail. However, the subsequent call to RfcCall (or RfcCallReceive) will fail.

    End of the note.

See also RfcOpenExt and RfcOpenExtV3.