RfcCall

This functin calls an ABAP function module via RFC:

RFC_RC SAP_API RfcCall(RFC_HANDLE handle,
char * function,
RFC_PARAMETER * parameters,
RFC_TABLE * tables);

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

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

Calling the function module RFC_SYSTEM_INFO

RFC_RC rfc_rc;
RFC_PARAMETER exporting[32];
RFC_TABLE tables[32];

exporting[0].name = NULL;
tables[0].name = NULL;

rfc_rc = RfcCall(handle, "RFC_SYSTEM_INFO", exporting, tables);

if(rfc_rc != RFC_OK)

{

...