With the concept of publishing CDS views as an OData service, a new and simple way to create OData services has been introduced.
With this approach, the OData model definition and OData service runtime are provided generically, according to SADL (Service Adaptation Description Language).
The requirement for this is that the annotation @OData.publish: true is specified at the view level.
To illustrate the step by step, let's go back to the example presented in the previous entry. “Creating CDS Views” from Eclipse.

In Eclipse, we add the necessary annotation for publishing; @OData.publish: true.

The next step will be to activate the view by pressing the “match”;

The ADT development tools delegate the activation request to the SADL framework, which generates various SAP Gateway artifacts that are stored in the backend of the AS ABAP application server and are required for the activation of the OData service in the SAP Gateway Hub system.
Once the activation has been carried out correctly, we should see a message “warning" like the one in the image, which tells us that we must move on to the second part of the process, where we will activate the service from SAP Gateway in the SAP backend.
As we can see, the service to be activated is; ZB_CDS_BASIC_ORDERS_CDS

With this, we enable the OData service in SAP Gateway, so we have a relationship between the technical name of the OData service and the corresponding back-end service.
Activate the Service in SAP Gateway
We access the transaction /n/iwfnd/maint_service

The first step is to recover our service so that we can activate it in the backend.
To do this, on the transaction selection screen, click on “Add Service”.

This takes us to the search engine where we will indicate the name ZB_CDS_BASIC_ORDERS_CDS and we will click on “Get Services” so that the system can recover it.

Once we can view it, we'll select it and click "Add Selected Services" so that it's included in the list of available services in our backend.

We assign the desired package and click continue.

If everything went as expected, we will receive the following message.

We return to the transaction /n/iwfnd/maint_service, where we should have the OData service already available.
We will conduct a search to locate you quickly.

Once located in the list, click on the name to check its correct activation.

The service can be tested in a browser or from the SAP Gateway client.
To get the URL of the published service and test it directly from the browser, we return to the CDS view and hover the mouse over the annotation icon @OData.publisher: true where the system displays an information window that allows you to navigate directly to the URL by clicking on the OData-Service text.
We see how in Eclipse the icon has changed, and we can navigate to the URL from here.


We can also test the call from the SAP Gateway client itself.
Since the transaction /n/iwfnd/maint_service we select the service and press “SAP Gateway Client”.

With this we recover the URL and we can launch the call by clicking on “Execute”.

Conclusion
Publishing CDS views as an OData service offers an efficient and structured way to expose data from the SAP backend to external environments. Thanks to annotation @OData.publish: true
and support for the SADL framework, the process is considerably simplified, integrating development in Eclipse with activation in SAP Gateway.
This approach not only streamlines service creation but also ensures better traceability and reusability of the data model for the direct benefit of the relevant company or institution, enabling developers to build more robust, consistent, optimized, and tailored interfaces within the SAP ecosystem.