360 likes | 730 Views
Remote Function Call. RFC from SAP R/3. Remote system. R/3 Application Server. Work Process. Function group. Call Function. FM. Work Process. Work Process. Call Function destination. FM. RFC. Remote Destinations.
E N D
RFC from SAP R/3 Remote system R/3 Application Server Work Process Function group Call Function FM Work Process Work Process Call Function destination FM
Remote Destinations • You maintain RFC destinations that must specify an ABAP program when calling remote function modules in the RFC sideinfo table RFCDES using Transaction SM59
RFC Types • Synchronous RFC • Asynchronous RFC • Transactional RFC • Queued RFC
Synchronous RFC REPORT ... ... CALL FUNCTION ‘ABC’ DESTINATION ‘PRD’ EXPORTING ... IMPORTING ... ... FUNCTION ABC. ... ... ENDFUNCTION.
Synchronous RFC REPORT ... ... CALL FUNCTION ‘ABC’ DESTINATION ‘PRD’ EXPORTING ... IMPORTING ... TABLES ... EXCEPTIONS communication_failure = 1 system_failure = 2 ... FUNCTION ABC. ... ... ENDFUNCTION.
Asynchronous RFC : aRFC REPORT ... ... CALL FUNCTION ‘ABC’ DESTINATION ‘PRD’ STARTING NEW TASK ‘T1’ EXPORTING ... ... FUNCTION ABC. ... ... ENDFUNCTION.
Asynchronous RFC : aRFC REPORT ... ... CALL FUNCTION ‘Z_ABC’ DESTINATION ‘PRD’ STARTING NEW TASK ‘T1’ PERFORMING get_result ON END OF TASK EXPORTING ... ... FORM get_result using t. RECEIVE RESULT FROM FUNCTION ‘Z_ABC’ IMPORTING … TABLES … … ENDFORM. FUNCTION Z_ABC. ... ... ENDFUNCTION.
Transactional RFC : tRFC REPORT ... ... CALL FUNCTION ‘Z_RFC1’ IN BACKGROUND TASK DESTINATION ‘PRD’ ... CALL FUNCTION ‘Z_RFC2’ IN BACKGROUND TASK DESTINATION ‘PRD’ ... COMMIT WORK. ... FUNCTION Z_RFC1. ... ... ENDFUNCTION. FUNCTION ZRFC2. ... ... ENDFUNCTION.
Transactional RFC : tRFC • In the source system, you can use the administration Transaction SM58 that let you display and monitor the tRFC • tRFC calls are stored in the local tRFC tables ARFCSSTATE and ARFCSDATA • If the remote tRFC is executed successfully, the accompanying entries are deleted from the tRFC tables
Transactional RFC : tRFC • If the connection cannot be made to the partner,this is logged in the tRFC table ARFCSSTATE,and the job is rescheduled • The default interval time for rescheduling the job is a maximum 30 times with a 15 minute interval
Queued RFC ... CALL FUNCTION ‘TRFC_SET_QUEUE_NAME’ EXPORTING qname = ‘Q01’. … CALL FUNCTION ‘Z_RFC1’ IN BACKGROUND TASK DESTINATION ‘PRD’ EXPORTING ... ... CALL FUNCTION ‘Z_RFC2’ IN BACKGROUND TASK DESTINATION ‘PRD’ EXPORTING ... … COMMIT WORK.
qRFC Monitor • SMQ1 for outbound Queue RFC