Start of Content Area

RfcCallReceive  Locate the document in its SAP Library structure

You can make an RFC call and receive return values using a single function:

RFC_RC SAP_API RfcCallReceive(RFC_HANDLE handle,
char * function,
RFC_PARAMETER * exporting,
RFC_PARAMETER * importing,
RFC_TABLE * tables,
char ** exception)

This function waits till it receives an answer before returning. The return values are just the same as those you would receive by calling RfcReceive. Note that RfcCallReceive can fail because you called RfcOpen with an invalid password. See RfcOpen for more information.

This function is defined in SAPRFC.H.

Return Values:

The call was successfully completed, and the values of the returned parameters were filled into the fields being supplied by the RFC_PARAMETER array.

An internal error has occurred. RfcLastError may give more information.

The callee has raised an exception. The field ‘*exception’ points to the name of the exception. No data were transported.

The local or remote RFC system has raised an exception. Also, ‘*exception’ points to the name of the exception. The connection was automatically closed by the system and RfcLastError may give more information on the origin of the error. Two exceptions may occur now: SYSTEM_FAILURE and COMMUNICATION_ FAILURE.

The callee has issued an RFC call to the caller of RfcReceive. No data are transported. The call request must be handled by using the functions RfcDispatch or by RfcGetName, RfcGetData and RfcSendData before an other call to RfcReceive can be done.

Function Parameters:

connection handle

function module to call

‘exporting’ parameters

‘importing’ parameters

‘tables’ parameters

output parameter: pointer to exception string. This parameter is only set if RFC_EXCEPTION or RFC_SYS_EXCEPTION is returned

See also RfcCall and RfcReceive.