Show TOC

Syntax documentationRfcOpenExtV3 Locate this document in the navigation structure

Use

Note Note

Better use the call RfcOpenEx.

End of the note.

The following function opens an RFC connection.

Syntax Syntax

  1. RFC_HANDLE  SAP_API  RfcOpenExtV3(char*	destination,
  2. 	RFC_MODE	mode,
  3. 	char*	hostname,
  4. 	int	sysnr,
  5. 	char*	gateway_host,
  6. 	char*	gateway_service,
  7. 	char*	client,
  8. 	char*	user,
  9. 	char*	password,
  10. 	char*	language,
  11. 	int	trace
  12. 	RFC_INT	use_load_balancing,
  13. 	char *	lb_host,
  14. 	char *	lb_system_name
  15. 	char *	lb_group
  16. 	RFC_INT	use_sapgui);
End of the code.

All parameters are passed as single fields (using RFC_MODE).

The following parameters are always needed in this call: RFC_MODE mode and SAP logon information: client, user, password, language, trace, and use_sapgui.

The following parameters are necessary, depending on RFC_MODE:

  • RFC_MODE_CPIC:

    • destination must be defined

    • gateway-host and gateway_service can be defined

    • sideinfo is necessary.

  • RFC_MODE_R3ONLY/RFC_MODE_VERSION_3

    • use_load_balancing is 0 (OFF)

      • destination is not NULL:

        gateway_host, gateway_service, hostname and sysnr can be defined. sideinfo is necessary.

      • destination is NULL:

        gateway_host and gateway_service can be defined. hostname and sysnr must be defined.

    • use_load_balancing is 1 (ON)

      destination, gateway_host, gateway_service, hostname and sysnr will not be evaluated.

      lb_host and lb_system_name must be defined. If lb_group is NULL, the group 'PUBLIC' will be used.

      Caution Caution

      use_sapgui and ABAP-Debug are not available with R/2.

      End of the caution.

This function is defined in SAPRFC.H.

Return Values:
  • Returns a handle to the RFC connection (RFC_HANDLE) or

  • Returns RFC_HANDLE_NULL

Function Parameters:
  • destination

    name of destination or NULL

  • mode

    connection mode (RFC_MODE)

  • hostname

    hostname of target system or NULL

  • sysnr

    system number (0-99)

  • gateway_host

    gateway hostname or NULL

  • gateway_service

    gateway service or NULL

  • client

    signon data: client

  • user

    signon data: user

  • password

    signon data: password

  • language

    signon data: language

  • trace

    trace (OFF/ON/ABAP-DEBUG or also trace ON and ABAP-DEBUG: 0/1/2/3)

  • use_load_balancing

    using load balancing feature (OFF/ON/0/1)

  • lb_host

    host name of the 'message server'

  • lb_system_name

    name of the target system (e.g. C11)

  • lb_group

    application server group or NULL for PUBLIC

  • use_sapgui

    using sapgui to display SAP dynpros and graphics (OFF/ON: 0/1)

See also RfcOpen and RFC_OPTIONS.