---
parser: v2
auto_validation: true
primary_tag: topic>abap-development
tags: [  tutorial>beginner, topic>abap-development, topic>abap-extensibility ]
time: 15
author_name: Raz Korn
author_profile: https://github.com/raz-korn
slug: abap-custom-ui-business-object
canonical_url: https://developers.sap.com/tutorials/abap-custom-ui-business-object
---

# Expose Custom Business Object as External Web Service
<!-- description --> Expose a custom business object as OAuth 2.0 web service for integration of your solution with other systems.

## Prerequisites  
- **Tutorial:**
[Create a Custom Business Object](abap-extensibility-cbo-create)
 - **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`)

## 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

## Intro
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

---

### Open custom business objects application

Navigate to **Custom Business Objects** tile to start the application.

![Open custom business objects application](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_CBO_tile.png)


### Generate OData service

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

![Edit Draft of Custom Business Object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_CBO_editDraft.png)

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](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_CBO_checkService_Publish.png)

> 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.


### Open custom communication scenarios application

Open **Custom Communication Scenarios** application.

![Open custom communication scenarios application](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_customScenario_tile.png)


### Create communication scenario

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](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_customScenario_newButton.png)

Enter **`Bonusplan Scenario`** as description and click **New**.

![Click on new](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_customScenario_newPopUp.png)


### Add inbound service to scenario

Add service **`YY1_BONUSPLAN_CDS`** by clicking **+** and **Publish** it.

![Add inbound service to scenario](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_customScenario_publish.png)


### Open communication arrangements application

Open **Communication Arrangements** application.

![Open communication arrangements application](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_communicationArrangement_tile.png)


### Create communication arrangement

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

![Create communication arrangement](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_communicationArrangement_newPopUp.png)


### Set communication system in arrangement

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](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-custom-ui-business-object/s4_communicationArrangement_save.png)

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.


### Test yourself



