Create Trusted RFC between Frontend and Backend system

We require trusted RFC between the Frontend SAP Gateway system and the Backend ECC or S/4 HANA system.
Its easy to create trust between Frontend Gateway system ( also know as trusted system) and backend system (also know as trusting system). We can use task list SAP_SAP2GATEWAY_TRUSTED_CONFIG to create a trusted trusting relationship between the two systems.

In BES system, Tcode STC01. Press F8.
Provide parameter for selected task.

It opens the Edit Variants screen. Provide RFC Destination, Description, check Load Balancing, provide System Id, Target Server and Group.

Edit variant screen. Fill as shown in the image.

Save the variant. Press back and execute. The task list executes successfully and creates a RFC in the backend system.

Create RFC connection from Frontend system to Backend system

Above we have seen how to create RFC using task list. Here we will learn to create RFC using Tcode SM59. Select ABAP connection and press create.

Tcode SM59. Select ABAP connection and press Create

Fill in RFC name and description. Select Load balancing and fill in other details.

Save and press Logon and Security tab to enter details. Provide client, select Current User and choose Yes for trust relationship field.

SM59 Logon and Security tab. Provide client. Select Current User. Choose Yes for Trust Relationship.

Save and click Connection Test to check if your RFC is working correctly.

How to create a trusted-trusting relationship between backend system and frontend system

In Frontend system go to Tcode SMT1.

TCode SMT1. Select ABAP system and press Create.

Follow the wizard. For field RFC Destination provide the RFC name.
If a Trusted Trusting relationship exists between the two systems, the wizard will not allow you to continue. It means that the trusted trusting relationship can be created only once between two systems.

Fill in System Id, Installation number and Application server to continue. Do restrict by providing validity period and press complete to finish the wizard.
As a last step, make sure that your Backend Sytem uses a Trust Relationship in its RFC.

In Backend Sytem change Trust Relationship to Yes.

This completes the process of creating RFC as well as building trusted trusting relationship.