The NW RFC API generally enables call-backs from RFC servers, both external and SAP. The following scheme shows you how to use this feature from the external RFC server's perspective:
An ABAP function module calls a function in the RFC server program. Function module 'XYZ' is any RFC-supported function module in this source SAP system.
The RFC server function contains a call-back to the ABAP client. The call-back is directed to the calling program by the ABAP runtime.
The ABAP program returns the requested data. This process can be repeated as often as required.
After the RFC server function has finished, a return code is sent back to the ABAP system.