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

Create an HTTP Service in SAP BTP ABAP Environment

Create an HTTP service in SAP BTP ABAP environment that can be called from the browser.

Overview

🎓 beginner 15 min. ABAP DevelopmentBeginnerSAP BTP ABAP EnvironmentSAP Business Technology PlatformS 4hana Cloud ABAP Environment

You will learn

  • โœ”How to create an HTTP service that can be accessed from a browser
  • โœ”How to return system data using a (whitelisted) ABAP utility class
  • โœ”How to expose the service for external consumption, by defining the necessary inbound communication artifacts Important: This tutorial is not suitable for SAP S/4HANA Cloud, private edition. If you would like to enable HTTP consumption from S/4HANA Cloud, private edition, see:
  • โœ”Developing External Service Consumption - Outbound Communication
  • โœ”Enable HTTP Communication in Your ABAP Code Throughout this tutorial, replace XXX or 000 with your initials or group number.
Julie Plummer J Julie Plummer March 27, 2025
Created by March 9, 2023
Contributors

Prerequisites

Prerequisites

Steps

Step 1 Create an HTTP service
โ€”

  1. Select a package and choose New > Other Repository Object from the context menu:

    Image depicting step-1a-new-repo-object
    Image depicting step-1a-new-repo-object

  2. Enter the filter text HTTP and choose Next:

    Image depicting step-1b-choose-HTTP-service
    Image depicting step-1b-choose-HTTP-service

  3. Enter a Name:Z_GET_DATE_HTTP_000 and Description:Get system date for your service and choose Next:

    Image depicting step-1c-name-service
    Image depicting step-1c-name-service

  4. Choose or create a transport request:

    Image depicting step-1d-transport-request
    Image depicting step-1d-transport-request

The new HTTP service is displayed on a new tab. The handler class and URL are generated automatically, in the form: https://<server:port>/sap/bc/http/sap/&lt;service_name&gt;?sap-client=100

Image depicting step-1e-new-service-created
Image depicting step-1e-new-service-created

Step 2 Implement the handler class
+
Step 3 Test the service
+
Step 4 Add method `get_html`
+
Step 5 Test the service again (optional)
+
Step 6 Check code
+
Step 7 Create an inbound Communication Scenario
+
Step 8 Add the HTTP service
+
Step 9 Create Communication Arrangement
+
Step 10 Create Communication System
+
Step 11 Create Communication User
+
Step 12 Save Communication Arrangement
+
Step 13 Test yourself
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 14
1. Create an HTTP service 2. Implement the handler class 3. Test the service 4. Add method `get_html` 5. Test the service again (optional) 6. Check code 7. Create an inbound Communication Scenario 8. Add the HTTP service 9. Create Communication Arrangement 10. Create Communication System 11. Create Communication User 12. Save Communication Arrangement 13. Test yourself 14. More Information

Learn more →