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.

tRFC Syntax<br />

© SAP AG<br />

PROGRAM ASYN01.<br />

.<br />

.<br />

.<br />

CALL FUNCTION 'A'<br />

DESTINATION '1'<br />

IN BACKGROUND TASK<br />

EXPORTING ...<br />

TABLES ...<br />

...<br />

CALL FUNCTION 'B'<br />

DESTINATION '1'<br />

IN BACKGROUND TASK<br />

EXPORTING ...<br />

TABLES ...<br />

COMMIT WORK.<br />

In contrast to synchronous RFC, there is an additional parameter sequence called IN BACKGROUND<br />

TASK<br />

All RFC calls which contain this sequence and the same DESTINATION are stored in the database<br />

using COMMIT WORK. These RFC calls form a Logical Unit of Work (LUW). The function<br />

modules are executed in the target system in the same sequence in which they are submitted in the source<br />

system.<br />

This means that, for each target system, the RFCs submitted in a LUW form a Logical Unit of Work.<br />

The called RFC-enabled function is executed once and only once.<br />

Exactly Once!<br />

This guarantees transaction integrity.<br />

You cannot specify IMPORTING parameters with CALL.<br />

External systems can benefit from the tRFC guarantee that a function module is executed once by using<br />

the RFC API call RfcIndirectCall.

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

Saved successfully!

Ooh no, something went wrong!