RFC Connection between two R/3 systems

Step1. Here we have two systems between which RFC calls will happen to retrieve data.

Go to Tcode- SM51 of both the systems. Here we will get to know what is the host name. 

Server name is a combination of – host name_system name_instance number.In this post-  calling system is – DV2(technode05)  and the target system is DV1(technode01).

The RFC will be created in DV2 system and RFC FM should exist in DV1 system which will be called in DV2 system.

Calling system-  DV2(technode05) & Target System- DV1(technode01).

Step2. In DV2 system, go to Tcode- SM59 to create a RFC connection. Here the connection is between two sap systems, so TYPE-3 connection should enable us to connect to R/3 systems. Select the ABAP connection and click on the create button.

Step3. Give a RFC destination name here DEV2_TO_DEV1, provide a description. Under technical settings, provide the host name of the target system(DV1) ( host name can be obtained form the Tcode- SM51 of the target system) and instance number of the target system( last two digit in the server name – can be obtained from SM51 tcode of the target system under server name column).

Go to the logon & security tab.

Step4. Here we need to provide the login credentials of the target system. When a RFC call will happen from the calling system to the system, bu using these credentials the system will logon to the target system. So provide the target system language, client, user name and password. Save it & do a connection test.

Step5. So here the connection works fine.

Step6. Now go to the target system. We have to create a RFC FM. So in SE80 tcode create a Function group and activate it.

Step7. Go to Tcode- SE37 of the target system, provide the FM name and click on create button.

Step8. Provide the Function group name, description and continue.

Step9. Choose RFC Enable Module radio button, other wise this FM we can’t call from our sender system. Click on Tables option.

Step10. Provide the details parameters. Here we have to keep in mind all importing exporting , tables nad changing parameter should be pass by value .  Go to the source code tab.

Step11. Provide the code. Here we need all the records from SFLIGHT table . Activate it. Click on the test button.

Step12. Execute it.

Step13. So here in the target system we have a 404 records present in sflight table.

Step14. Just a number of records comparison between two systems. In the calling system – it is 416 and in target it is 404.

Step15. Go to the calling system and create a report in SE38 which calls the synchronous RFC function module. Here we have to add the extra option- DESTINATION – as the RFC destination created in SM59 of the calling system. system. 

Step16. Put a debug point in target system. Execute the report in calling system.

Step17. So here the debugger stops when a rfc call is made. F8 to finish.

Step18. So here we have the 404 records of the target system read by the RFC call and displayed in the calling system.



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