Show TOC

Background documentationRfcCall Locate this document in the navigation structure

 

This functin calls an ABAP function module via RFC:

Syntax Syntax

  1. RFC_RC  SAP_API   RfcCall(RFC_HANDLE	handle,
  2. 	char *	function,
  3. 	RFC_PARAMETER *	parameters,
  4. 	RFC_TABLE *	tables);
End of the code.

The structures RFC_PARAMETER and RFC_TABLE contain names and descriptions of the 'exporting' parameters and tables specified in the function's interface. Tables can only be internal ABAP tables. The function returns after the call-request is sent. If the function returns RFC_OK there is no guarantee that the call has already been received by the target system.

This function is defined in SAPRFC.H.

Return Value:
  • Returns after sending the call request and returns either RFC_OK or RFC_FAILURE

Function Parameters:
  • handle

    connection handle

  • function

    function module to call

  • parameters

    'exporting' parameters

  • tables

    'tables' parameters

    Note Note

    RfcCall can fail because you called RfcOpen with an invalid password. See RfcOpen for more information.

    End of the note.

Syntax Syntax

Calling the function module RFC_SYSTEM_INFO

  1. RFC_RC	rfc_rc;
    RFC_PARAMETER	exporting[32];
    RFC_TABLE	tables[32];
  2. exporting[0].name = NULL;
    tables[0].name = NULL;
  3. rfc_rc = RfcCall(handle, “RFC_SYSTEM_INFO”, exporting, tables);
  4. if(rfc_rc != RFC_OK)
  5. {
  6. ...
End of the code.