17.08.2013 Views

Data Interfaces

Data Interfaces

Data Interfaces

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

External RFC Program: Server<br />

© SAP AG<br />

main(...)<br />

{ ...<br />

RfcAccept(...)<br />

...<br />

RfcInstallFunction(...)<br />

...<br />

RfcDispatch(...)<br />

...<br />

RfcClose(...)<br />

}<br />

...<br />

static RFC_RC rfcfunc(...)<br />

...<br />

<strong>Data</strong> processing<br />

{ RfcGet<strong>Data</strong>(...)<br />

RfcSend<strong>Data</strong>(...)<br />

}<br />

The above example demonstrates how an external RFC server program should be structured.<br />

RfcInstallFunction installs all RFC-enabled functions in this program. You must explicitly declare all<br />

program functions. This allows RfcDispatch to find them.<br />

In addition, RfcInstallFunction automatically declares the following standard library functions:<br />

RFC_SYSTEM_INFO: Returns system information to the calling system.<br />

RFC_DOCU: Documents which RFC functions can be called in the program.<br />

RFC_PING: Checks that the communication path to the program is correct.<br />

RFC_START_GUI: Starts SAPGUI on the frontend.<br />

ARFC_DEST_SHIP,<br />

ARFC_DEST_CONFIRM: Used internally with transactional RFC.<br />

You can call these in R/3 from the menu bar of Transaction SM59 when you display a RFC destination<br />

(system information: target system, function list, test connection)<br />

RfcDispatch waits for a function call for an internal program function and subsequently calls this<br />

function.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!