cancel
Showing results for 
Search instead for 
Did you mean: 

Developer extendibility for custom table and publish oDATA

saurabh_shukla4
Explorer
0 Kudos

Hi,

In case of on stack (developer extension) it is mentioned that we have to use local released stable APIs, extension points. Is it possible that we develop own service using custom table and publish it as oData (API) and then consume it anywhere? I have s4hana public cloud.

What I want to achieve is, create z table (custom object) and data will be stored, fetched and changed in the same table. The service will be created of the same table and then API (oDATA) will be published at s4hana public cloud.

Appreciate any help,

SS

Accepted Solutions (1)

Accepted Solutions (1)

MioYasutake
Active Contributor

In S/4HANA Public Cloud, you can use Custom Business Object App to create a custom table and expose it as OData service.

https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps('F1712')/S32

saurabh_shukla4
Explorer
0 Kudos
Do I have to create cds view and expose service after that?
Pradeep_Reddy
Participant
0 Kudos
my opinion, when it comes to custom tables, opting for RAP over CBO is preferable. CBO has certain limitations, whereas RAP offers greater flexibility for incorporating additional features in the future.
MioYasutake
Active Contributor
0 Kudos
@saurabh_shukla4 Yes, but you don't need to define CDS views yourself. Simply define necessary data model in the app and create OData service by checking "Service Generation". CDS views and an OData service will be automatically generated.

Answers (1)

Answers (1)

Pradeep_Reddy
Participant

Hi,

Creating a Remote-Enabled ABAP (RAP) service for a custom table and exposing it through service consumption as an API is a powerful way to integrate SAP systems with external applications. While the process may seem complex, numerous blogs within the community offer detailed guidance on achieving this.

  1. Understanding RAP Services:

    • RAP services enable the development of modern, OData-based services on SAP systems.
    • They provide a framework for building robust, scalable APIs for accessing SAP data.
  2. Creating a Custom Table:

    • Before creating the RAP service, define the structure of the custom table in the SAP system.
    • This table will store the data that the API will expose to external applications.
  3. Developing the RAP Service:

    • Use ABAP development tools to create a new RAP service based on the custom table.
    • Define the necessary data models, behavior definitions, and service bindings within the RAP service.
  4. Exposing the Service via Service Consumption:

    • Once the RAP service is developed, expose it via service consumption as an API.
    • This step involves configuring the service consumption layer to make the RAP service accessible to external consumers.

Regards,

Pradeep.