Create Communication Objects for a Remote OData Service
- In the provisioning system: How to expose a CDS view as an OData service using a Service Binding
- How to wrap this OData service in an inbound communication scenario, so that it can be accessed from another instance of SAP BTP, ABAP environment
- How to make the provisioning system available for connection from other ABAP systems
- How to test your service URL in Postman (optional)
- In the client system: How to create a new destination with an HTTP connection, pointing to the provisioning system
- IMPORTANT: This tutorial cannot be completed on a trial account
- You have set up 2 instances of SAP Business Technology Platform, ABAP Environment, a provisioning system and a client system, for example by using the relevant booster: Using a Booster to Automate the Setup of the ABAP Environment
- Tutorial: Create Your First Console Application, for a licensed user, steps 1-2, for both instances
- In the provisioning system:
- The business catalog
SAP_CORE_BC_COMis assigned to your user
- The ABAP Flight Reference Scenario is available. To pull this reference scenario from
Github, see Downloading the ABAP Flight Reference Scenario
- You have exposed the data definition
/DMO/TRAVEL_Uas an OData service, using a service definition and service binding
- The business catalog
- You have read Developing a UI Service with Access to a Remote Service and its Scenario Description, since this mission is based on this tutorial series
- Optional: You have installed the Postman API Platform
This involves some overhead for one consumer; however, the advantage is that you can add several consumer systems, or users (for example, with different authentication) pointing to the same HTTP service, wrapped in the same Communication Scenario.
You want to get data that is only available in a remote instance of SAP BTP, ABAP Environment ( provisioning system ) and display it in a second instance ( client system ).
You need to:
- Create inbound communication artifacts for an OData Service in the provisioning system
- Create a Service Consumption Model, and save this locally as a
$metadataXML file; From this you will create proxy artifacts in the client system, representing the remote service, and use this model to generate an abstract entity
- Create a Remote Client Proxy
- Build a new OData service in the client system, using a CDS custom entity and query implementation class
- Finally, display the remote data in Fiori Elements preview in your browser
- Step 1
In your provisioning system, select your package, then choose New > Other Repository Object… from the context menu.
Add the filter
scen, then choose Communication Scenario, then choose Next.
Add a Name:
Z_WRAP_TRAVEL_XXXand Description, Inbound for Travel Remote Service, choose a transport request, then choose Finish.
Your Communication Scenario appears in a new editor.
You can also see this scenario in the Project Explorer.
- Step 2
On the Inbound tab, choose Add….
IMPORTANT: Choose Browse. You cannot simply enter the name. Then add a filter, such as
Z_BIND_T, select your service - with the ending
IWSG, then choose Finish.
Your service appears. Choose Publish Locally.
- Step 3
From the Dashboard Home screen, choose From Communication Management > Communication Systems.
Enter a System ID,
ZTRAVEL_XXX, and accept the default (identical) System name, then choose Create.
In Technical Data:
Switch Destination Service to OFF.
In Host Name, enter the base URL of your provisioning system without the protocol - i.e. the URL should have the form
<GUID>.abap.<region>.hana.ondemand.com. Again, you can find the URL for the dashboard by selecting your system (that is, ABAP Project in Project Explorer), then choosing Properties > ABAP Development from the context menu.
Business System = dummy
Scroll down to Users for Inbound Communication, then create a new user by choosing the + icon.
Choose New User and the Authentication Method: User name and password.
Enter a name,
Z_TRAVELPRO_XXX, and description, then choose Propose password, then choose Create > OK > Save.
XXXis the name of the provisioning system, that is, this system. IMPORTANT: Save the proposed password to a text file, since you will need it later.
Save your changes.
- Step 4
Open the dashboard for your system in a browser. You can find the URL for the dashboard by selecting your system (that is, ABAP Project in Project Explorer), then choosing Properties > ABAP Development from the context menu.
From Communication Management, choose Communication Arrangement. Then choose New.
Choose your scenario,
Z_WRAP_TRAVEL_XXXfrom the drop-down list. Accept the default (identical) Arrangement name.
From the dropdown list, choose your communication system
Save your changes.
Your Communication Arrangement should look roughly like this.
The Service URL / Service Interface = < Base URL of provisioning system > + relative path of your Inbound Service, here
- Step 5
Open Postman. In the Authorization tab, enter your authorization credentials:
- Type = Basic Auth.
- Username =
- Password = The generated password you noted down
Stick with the default GET and paste the complete path of your service, Base URL and relative path, into the input field, then choose Send.
The response appears in the Body field, along with the status 200 OK.
- Step 6
You will now open the client system and create a destination service instance there. This must be created at subaccount (not Space) level.
In the client system, open the SAP BTP Cockpit of your Cloud Foundry subaccount and choose Destinations, then choose New Destinations.
Enter the following values. Note the name, since you will be using it later:
Field Name Value Name
SID= your provisioning system
Description Connect <your_client_system> to <your_provisioning_system> URL <URL of inbound service without relative path (see below)> Proxy Type Internet Authentication
INBOUND_TRAVELPRO_XXX(i.e. from the communication system)
Password The generated password you noted down
Check the connection:
- Step 7
When creating your communication system, what value should you enter under Host Name?