Get Data from a Remote System Using a Custom Entity
- How to create a suitable custom entity to get data from a remote system
- How to implement a query provider class to get the data, using a BAPI (Business Application Programming Interface)
- How to expose the custom entity as a service definition
- How to display the data in a Fiori Elements Preview, using a service binding
Prerequisites
- You have done one of the following:
- Created an instance of SAP Business Technology Platform, ABAP Environment, Trial Version
- Created an entitlement to SAP Business Technology Platform, ABAP Environment, customer licensed version
- IMPORTANT: If you are using the licensed version, then this tutorial is part of the mission Connect Your On-Premise System with SAP BTP, ABAP Environment. Please work through the previous tutorials in the mission first; otherwise this tutorial may not work. If you are using the trial version, we have provided mock data inside the class.
Note that, if you are using the trial version, currently you cannot access an on-premise system using RFC. In that case, you will test the class using mock data.
A BAPI is a standard interface to a business object model, implemented as a function module.
Custom entities are used for data models whose runtime is implemented manually. There is no SELECT statement on the data source. Rather, you define the elements and their types in the custom entity. Then you implement the data retrieval logic in an ABAP class, which is referenced in an entity annotation. Custom entities allow you to get data using an OData service or, as here, using RFC.
More Information
-
SAP Help Portal: Using a CDS Custom Entity to Define the Data Model for an OData Service
-
Implement a custom entity in the ABAP RESTful Programming Model using RFC - includes handling a single record, filtering, and ordering
-
Call a remote OData service from the trial version of SAP BTP ABAP environment
-
Find out more about SAP Business Technology Platform ABAP Environment on SAP Community: SAP Business Technology Platform ABAP Environment