SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Connect to Your On-Premise System from SAP BTP, ABAP Environment Using RFC

Call a remote function module located in an on-premise system, such as a SAP S/4HANA System, from the ABAP Environment

Overview

🎓 intermediate 30 min. ABAP DevelopmentIntermediateSAP BTP ABAP EnvironmentSAP Business Technology PlatformSAP S 4hana Cloud ABAP Environment

You will learn

  • โœ”How to create a secure RFC connection between your SAP BTP, ABAP Environment and an on-premise SAP System, e.g. SAP S/4HANA
  • โœ”How to test the connection using an ABAP handler class. This class will retrieve system information using a Remote Function Call (RFC), RFC_GET_SYSTEM_INFO This tutorial mission was written for SAP BTP ABAP Environment. However, you should also be able to use it in SAP S/4HANA Cloud Environment in the same way. Throughout this tutorial, replace ### or 000 with your initials or group number. > This tutorial is part of a mission, Get Data from an On-Premise System Using a Remote Function Call - RFC. Make sure you have fulfilled the prerequisites in the previous tutorial and that you follow each tutorial in order.
Julie Plummer J Julie Plummer July 16, 2025
Created by March 9, 2023
Contributors

Prerequisites

Prerequisites

Steps

Introduction

To learn more about this scenario, see the tutorial: Get Data from a Remote System Using a Remote Function Call (RFC): Scenario

Step 1 Check SAP Cloud Connector Configuration
โ€”

First, you need to connect your ABAP on-premise system to your BTP sub-account by means of SAP Cloud Connector.

  1. In your browser, log on to SAP Cloud Connector:

    • Address = e.g. https://localhost:<port> (Default = 8443)
    • User = Administrator
    • Initial password = manage (You will change this when you first log in)
  2. Your configuration should look like this.

    step1b-scc-location-id
    step1b-scc-location-id

The Location ID is optional. It enables you to connect multiple Cloud Connectors to a subaccount.

Step 2 Check that On-Premise System has been added
+
Step 3 Check connectivity in SAP BTP cockpit (optional)
+
Step 4 Create package in ADT
+
Step 5 Create outbound service
+
Step 6 Create communication scenario
+
Step 7 Create communication system
+
Step 8 Create communication arrangement
+
Step 9 Create ABAP class for RFC connection in SAP BTP, ABAP Environment
+
Step 10 Create variables in interface
+
Step 11 Create variables in class implementation
+
Step 12 Call remote function from on-premise system
+
Step 13 Output result
+
Step 14 Wrap method in an exception
+
Step 15 Add error handling to the class for the RFC connection
+
Step 16 Check your code
+
Step 17 Test the class
+
Step 18 Test yourself
+
Step 19 More Information
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 19
1. Check SAP Cloud Connector Configuration 2. Check that On-Premise System has been added 3. Check connectivity in SAP BTP cockpit (optional) 4. Create package in ADT 5. Create outbound service 6. Create communication scenario 7. Create communication system 8. Create communication arrangement 9. Create ABAP class for RFC connection in SAP BTP, ABAP Environment 10. Create variables in interface 11. Create variables in class implementation 12. Call remote function from on-premise system 13. Output result 14. Wrap method in an exception 15. Add error handling to the class for the RFC connection 16. Check your code 17. Test the class 18. Test yourself 19. More Information

Learn more →