RFC Communication between two systems- Use of predefined RFC destination

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.




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s