Gyan Factory

Gyan Factory
SAP Technical Project Support

Friday, January 8, 2016

RFC Communication between two systems- Use of predefined RFC destination : BACK

 Link for RFC Connection between  two system:  SAP RFC Connection between two R/3 systems

Step1. Calling System :  We have the below report which calls a RFC M defined in the target system.
RFC destination is used as : DEV2_TO_DEV1 which is defined in the tcode- SM59 of the calling system.





























Step2.  Calling System : Tcode- SM59 of the Calling system.

















Step3.  Calling System :  Create FG and create a RFC FM as shown below in the calling system.




























Step4.  Calling System : Maintain  Below exporting parameter.





















Step5.  Calling System : Below source code. Activate the RFC FM.





















Step6. Target System: Define the RFC  FM in the target system.





















Step7. Target System: Maintain the parameter under tables section.






















Step8. Target System: Have the  below source code. Inside this call the RFC Fm defined in the calling system. Here it uses a special destination BACK which is predefined in SM59 tcode. 
When a RFC FM is called from a calling system, the calling system program uses a RFC destination created in its SM59 transaction with the target system details. When a call goes to the target RFC FM , the target again can call back to any RFC FM of the calling system by the predefined RFC destination BACK. 























Step9.  The table RFCDES stores all RFC destination created in SM59 transaction. You can use this table to read any RFC destination name and mention the dynamic destination name while calling the RFC function module.






















Step10.  Here the predefined destination BACK in SM59 tcode.






















Step11.  Calling  System:  Here we have a report in the calling system. Which calls the RFC FM in the target system to read certain records and then target RFC FM calls the sender system RFC FM to get the flight code and on basis of it pass the records to the sender system.






















Step12.  Calling  System: Here is the output list.






















--------------------------------------------------------------------------------------

No comments:

Post a Comment