Skip to Content

Expose Custom Business Object as External Web Service

Expose a custom business object as OAuth 2.0 web service for integration of your solution with other systems.
You will learn
  • How to create the OData service for a custom business object
  • How to expose the custom business object’s service to the internet
julieplummer20Julie PlummerJune 12, 2023
Created by
julieplummer20
March 9, 2023
Contributors
mervey45
julieplummer20
Liebherr

Prerequisites

  • Tutorial:
    Create a Custom Business Object
  • Authorizations: Your user needs (a) business role(s) with business catalogs Extensibility - Custom Business Objects (ID: SAP_CORE_BC_EXT_CBO), Extensibility - Custom Communication Scenarios (ID: SAP_CORE_BC_EXT_CCS) and Communication Management (ID: SAP_CORE_BC_COM)

This tutorial shows how to generate the OData service for an existing custom business object. Furthermore this service is exposed to the internet via the creation of a custom communication scenario. The creation of a communication arrangement for the Bonusplan scenario is the second part of the exposure.

Additional Information

  • SAP S/4HANA Cloud Release (tutorial’s last update): 1902
  • Step 1

    Navigate to Custom Business Objects tile to start the application.

    Open custom business objects application
  • Step 2

    Open details of your custom business object Bonusplan and Edit Draft.

    Edit Draft of Custom Business Object

    Select the Service Generation checkbox and click Publish. With this step an OData service is created.

    Checkmark Service Generation for Custom Business Object and Publish

    Be aware that UI Generation needs to stay de-selected as otherwise due to a limitation you wouldn’t get the label texts automatically in the custom UI.

  • Step 3

    Open Custom Communication Scenarios application.

    Open custom communication scenarios application
  • Step 4

    A communication scenario is the basis definition for a communication between systems. It defines a solution to be made available for external systems. Click New, give your scenario a name, description and click New again.

    Create communication scenario

    Enter Bonusplan Scenario as description and click New.

    Click on new
  • Step 5

    Add service YY1_BONUSPLAN_CDS by clicking + and Publish it.

    Add inbound service to scenario
  • Step 6

    Open Communication Arrangements application.

    Open communication arrangements application
  • Step 7

    Create a communication arrangement. This time you create it for your Bonusplan scenario.

    Create communication arrangement
  • Step 8

    Select SCP_DEV_SYSTEM as your communication system. Select SCP_DEV as communication user with OAuth 2.0 as authentication method.

    Click Save.

    Set communication system in arrangement

    By exposing the service via custom communication scenario and communication arrangement, you will be able to select it from the list of services in a SAP Web IDE project.

  • Step 9

    Which configuration authorizes users to access Bonus plan data via the inbound communication user?

Back to top