Skip to Content
Personal Insights
Author's profile photo Lars Hvam

ABAP & http, why can’t we just have something nice?

As noted in the last section of ABAP & Excel, why can’t we just have something nice? its not only Excel that is a challenge, its the same with JSON and http. This blog post focuses on http, which is difficult to get working everywhere.

As noted by Martin Pankraz in SAP S/4HANA Cloud ABAP Environment integration journey with Microsoft – Part 1 – Microsoft Teams approval, there is currently no http client released in S/4 HANA Private Cloud.

It is, however, possible to do a wrapper as per Enable HTTP Communication in Your ABAP Code

Released APIs?

Until now, I’ve assumed that logic implemented in ABAP Cloud in SAP BTP ABAP Environment would automatically be compatible with S/4 HANA Cloud Public Edition and S/4 HANA Private Edition, assuming its the same quarterly/yearly/bi-yearly release. But looks like the picture is more like,

With CL_HTTP_CLIENT not released, and CL_HTTP_DESTINATION_PROVIDER released in ABAP Cloud in SAP BTP ABAP Environment and S/4HANA Cloud Public Edition.

The diagram might be incorrect, but there is no transparency was to what is released when/where. only includes a subset of the released objects, and it’s not versioned or machine readable. As noted in 2020 this is a challenge to the ABAP ecosystem, making it difficult for partners and customers to write future compatible code.

Lets do it?

So what’s the fix? CL_HTTP_CLIENT and CL_HTTP_DESTINATION_PROVIDER has small differences to the method signatures making them incompatible seen from a consumer perspective.


My suggestion would be to write a new nice http client library, which can be used anywhere, but it does require a http client to be released in S/4 HANA Cloud Private Edition.

Pull requests welcome,


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Daniel Gerecht
      Daniel Gerecht

      Hi ,

      thanks for your open feedback. I completely understand that you assumed that logic implemented in SAP BTP ABAP Environment and S/4HANA Cloud Public Edition would automatically be compatible to S/4HANA Cloud Private Edition (assuming its the same quarterly/ bi-yearly release).

      Unfortunately this does not hold true in the area of Integration and Access Management. In S/4HANA Private Cloud systems there is no separation between SM59 destinations and PFCG roles, managed by SAP and the customer. In the public cloud there was from the beginning a clear separation between SAP owned and customer owned content to allow for a higher degree of automation.

      For this reason, e.g. the development objects Communication Scenarios and Business Catalogs where introduced only in the public cloud delivery and not for private cloud. In the public cloud the administrator has no direct access to SM59 destinations and PFCG roles. See Authorization Basics | SAP Help Portal for details around these concepts.

      Of course, we have the aim to provide only one ABAP Cloud development model, both for public and private cloud. I hope it is understandable that a few extra development objects might be needed for content separation in the public cloud, but we all want to have the same ABAP code in both worlds.

      This works for nearly all classes that are released for usage in ABAP Cloud, e.g. the HTTP Client instances created by CL_WEB_HTTP_CLIENT_MANAGER or authorization checks. But this becomes very difficult, when SM59-destinations are accessed in a released class. In the public cloud we implemented a strict content separation based on development objects (Communication Scenarios) that do not exist in the private cloud. This is the reason why the class CL_HTTP_DESTINATION_PROVIDER with its method "create_by_comm_arrangement" is not available in the private cloud.

      As an intermediate solution we created the class CL_OUTBOUND_PROVIDER (with create_by_destination method). But we cannot release this class for usage in the public cloud because it does not reference any development object that would allow content separation in the public cloud. Thus the developer currently has to write a small wrapper outside ABAP Cloud, as explained in Enable HTTP Communication in Your ABAP Code | SAP Help Portal.

      We are working on a new unified concept for content separation of destinations that works both in private and public cloud. With newly introduced development objects we plan to make it possible in the future to use the same ABAP code in both worlds.

      Best regards,

      Daniel Gerecht

      ABAP Integration & Security

      Author's profile photo Lars Hvam
      Lars Hvam
      Blog Post Author

      thanks for clarifying 🙂

      Author's profile photo Alexander Rother
      Alexander Rother

      Hi Lars,

      Just a small addition: we are also working on enhancements of the SAP Business Accelerator Hub to support more objects and local APIs. Moreover it is versioned for the on-premise or private cloud solution (see e.g. example API and then in the upper right the drop down "Select Release").

      Best regards,



      Author's profile photo Tomas Buryanek
      Tomas Buryanek

      And why cannot we have CL_HTTP_CLIENT released in HANA Cloup Public edition?

      EDIT: Ah I see. SM59, ports etc...