---
title: How to Create an OData Service and Exposing CDS Views as an OData Service
description: When it comes time to create an OData project, there are a few things you’ll need to do. Here’s how to create an OData service.
image: https://blog.sap-press.com/hubfs/How%20to%20Create%20an%20OData%20Service%20and%20Exposing%20CDS%20Views%20as%20an%20OData%20Service.png
---

[![rheinwerk-sappress-logo-header-1](https://blog.sap-press.com/hubfs/rheinwerk-sappress-logo-header-1.svg)](https://blog.sap-press.com/) [Blog](https://blog.sap-press.com)

- Books 
    - Get an overview of our books and courses on every relevant SAP topic. 
          - [Programming](https://sap-press.com/programming/)
          - [Administration](https://sap-press.com/administration/)
          - [BI](https://sap-press.com/business-intelligence/)
          - [Finance](https://sap-press.com/finance-controlling/)
          - [Logistics](https://sap-press.com/logistics/)
          - [HR](https://sap-press.com/human-resources/)
          - [CRM & Sales](https://sap-press.com/marketing-sales/)
          - [HANA](https://sap-press.com/hana/)
          - [Introductions](https://sap-press.com/introductions/)
          - [E-Bites](https://sap-press.com/e-bites/)
          - [Certification Guides](https://www.sap-press.com/certification-guides/)
          - [Rheinwerk Courses](https://www.sap-press.com/online-courses/)
- Book Subscription 
    - Get unlimited access to all SAP PRESS books! 
          - [SAP PRESS Subscription](https://sap-press.com/subscriptions/)

[Programming](https://blog.sap-press.com/tag/programming)

# How to Create an OData Service and Exposing CDS Views as an OData Service

![SAP PRESS](https://blog.sap-press.com/hubfs/Twitter_profile_pic.svg)  by [SAP PRESS](https://blog.sap-press.com/author/sap-press)

When it comes time to create an OData project, there are a few things you’ll need to do. First, however, make sure you’ve created all the required core data services (CDS) views.

 

Assuming you’ve done that, here’s how to create an [OData](https://blog.sap-press.com/introduction-to-odata-in-sap) service, as well as exposing [CDS views](https://blog.sap-press.com/abap-sql-versus-cds-views-and-amdps-what-to-use#cds-views) as a service.

 

## Creating the OData Project

For this, go to Transaction SEGW, click on the **Create Project** icon, and name the OData project (in this case, we’re naming it “Z\_PurchDocsOVP”).

 

Now we need to add our CDS views into the OData project:

1. Expand the OData project tree structure.
2. Right-click on **Data Model,** and choose **Reference** \_ **Data Source** (as shown in the first figure).
3. Add our first CDS view for the filter bar Z\_C\_PurchaseDocumentFiltersOVP.
4. Click **Next** and then click **Finish** to add the CDS view to the project.

![Add Data Source](https://blog.sap-press.com/hubfs/05_004-1.jpg)

 

## Adding Overview Page Card CDS Views into the Project

With the OData project created, now it’s time to add our CDS views for the OVP cards into the project. To do so, click on the **Add CDS-Entity** button at the top of the screen, and add the remaining CDS views one by one as shown in the following figure.

 

![SAP Gateway Service Builder](https://blog.sap-press.com/hubfs/05_005.jpg)

 

Now click on the **Generate** icon on the toolbar, and click on **Continue** in the popup window, as shown in the next figure.

 

![Defining the Model and Service](https://blog.sap-press.com/hubfs/05_006.jpg)

 

On the next popup window, you can either save it into your package or as a local object (in this case, we save it as a local object). After you’ve generated the project, you’ll notice a few green checkmarks against the three CDS views in the project.

 

![Saving as Local Object](https://blog.sap-press.com/hubfs/05_007.jpg)

 

You’ll notice that two of them are checked against **Z\_C\_PriorityVH** and **Z\_C\_StatusVH**—this is because the programmer added value helps in the code, allowing filtering. The framework automatically detected these views as value helps and marked them. The third CDS view with the checkmark is for **Z\_C\_PurchaseDocumentOVP** because the metadata extensions for the CDS view contain analytical annotations for the charts.

 

After the OData project is generated, we need to register the OData service so that we can use it in SAP Business Application Studio to generate the OVP application.

 

## Importing the OData Service

Execute Transaction /n/IWFND/MAINT\_SERVICE on the SAP Gateway hub system. Click on the **Add Service** button, as shown in the figure below.

 

![Importing OData Service](https://blog.sap-press.com/hubfs/05_008.jpg)

 

## Registering the OData Service

In the next screen shown in the final figure, enter the **System Alias** as “Local” because your OData project is being registered on the same system. If you want to register the service in another SAP Gateway system, then enter the respective system alias. Enter the project name “Z\_PURCHDOCSOVP\*” or the name you’ve given for your project into the **External Service Name** field and press (Enter).

 

You should see your OData service ending with \_SRV. Select the checkbox next to the service name, and click the **Add Selected Services** button. Click **Continue** on the popup window and the subsequent pop ups asking for confirmation.

 

![Registering OData Service](https://blog.sap-press.com/hubfs/05_009.jpg)

## Conclusion

Knowing how to create an OData service is an important step in ABAP development. So is exposing it—and once you’ve exposed a CDS view via the OData service, you can start front-end application using the SAP Business Application Studio.

 

## Learn ABAP with Rheinwerk Courses!

Ready to level up your ABAP skills? Explore the full range of our ABAP-focused online courses, from foundational programming to advanced RAP, CDS, AMDP, unit testing, and more. Each one is instructor-led (live and on-demand), includes recordings and slide decks, and is designed to give you practical take-away skills you can apply right away in your SAP landscape. Click on the banner below to get started!

 

[![ABAP Courses](https://blog.sap-press.com/hs-fs/hubfs/blog_courses_abap_series.png?width=597&height=199&name=blog_courses_abap_series.png)](https://www.sap-press.com/online-courses/)

 

Editor’s note: This post has been adapted from a section of the book *[ABAP Development for SAP S/4HANA: ABAP Programming Model for SAP Fiori](https://www.sap-press.com/abap-development-for-sap-s4hana_4766?utm_source=sappressblog&utm_medium=referral&utm_campaign=Blogs&utm_term=1964_chapter5&utm_content=1764)* by Stefan Haas and Bince Mathew.

## Recommendation

[![ABAP Programming Model for SAP Fiori: ABAP Development for SAP S/4HANA](https://blog.sap-press.com/hs-fs/hubfs/Images/Book%20Covers/1764.png?width=170&name=1764.png)](https://www.sap-press.com/abap-development-for-sap-s4hana_4766?utm_source=sappressblog&utm_medium=referral&utm_campaign=Blogs&utm_term=1964_chapter5&utm_content=1764)

**ABAP Programming Model for SAP Fiori: ABAP Development for SAP S/4HANA**

Combine your skills in ABAP, SAP Fiori, core data services, and more to master the end-to-end development process for SAP S/4HANA applications. Learn to use the ABAP programming model for SAP Fiori to build applications from scratch, or use SAP Fiori elements to get a head start! Then, deploy your applications to SAP Fiori launchpad and get the best practices you need to operate applications post-development, including Git version control, application tests, and setting up an integration pipeline.

[Learn More](https://www.sap-press.com/abap-development-for-sap-s4hana_4766?utm_source=sappressblog&utm_medium=referral&utm_campaign=Blogs&utm_term=1964_chapter5&utm_content=1764)

![SAP PRESS](https://blog.sap-press.com/hubfs/Twitter_profile_pic.svg)

**by [SAP PRESS](https://blog.sap-press.com/author/sap-press)**

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP IBP, intelligent technologies, SAP Business Technology Platform, and more!

[Programming](https://blog.sap-press.com/tag/programming)

[![Share on facebook](https://7528309.fs1.hubspotusercontent-na1.net/hub/7528309/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/facebook-color.png?width=24&name=facebook-color.png)](https://www.facebook.com/share.php?u=https%3A%2F%2Fblog.sap-press.com%2Fhow-to-create-an-odata-service-and-exposing-cds-views-as-an-odata-service%3Futm_medium%3Dsocial%26utm_source%3Dfacebook) [![Share on linkedin](https://7528302.fs1.hubspotusercontent-na1.net/hub/7528302/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/linkedin-color.png?width=24&name=linkedin-color.png)](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fblog.sap-press.com%2Fhow-to-create-an-odata-service-and-exposing-cds-views-as-an-odata-service%3Futm_medium%3Dsocial%26utm_source%3Dlinkedin) [![Share on twitter](https://7528304.fs1.hubspotusercontent-na1.net/hub/7528304/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/twitter-color.png?width=24&name=twitter-color.png)](https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fblog.sap-press.com%2Fhow-to-create-an-odata-service-and-exposing-cds-views-as-an-odata-service%3Futm_medium%3Dsocial%26utm_source%3Dtwitter&url=https%3A%2F%2Fblog.sap-press.com%2Fhow-to-create-an-odata-service-and-exposing-cds-views-as-an-odata-service%3Futm_medium%3Dsocial%26utm_source%3Dtwitter&source=tweetbutton&text=) [![Share on email](https://7528311.fs1.hubspotusercontent-na1.net/hub/7528311/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/email-color.png?width=24&name=email-color.png)](mailto:?subject=Check+out+https%3A%2F%2Fblog.sap-press.com%2Fhow-to-create-an-odata-service-and-exposing-cds-views-as-an-odata-service%3Futm_medium%3Dsocial%26utm_source%3Demail&body=Check+out+https%3A%2F%2Fblog.sap-press.com%2Fhow-to-create-an-odata-service-and-exposing-cds-views-as-an-odata-service%3Futm_medium%3Dsocial%26utm_source%3Demail)

### Comments

### Latest Blog Posts

[![How to Consume an OData Service from a Cloud System in SAP Web IDE](https://blog.sap-press.com/hs-fs/hubfs/How%20to%20Consume%20an%20OData%20Service%20from%20a%20Cloud%20System%20in%20SAP%20Web%20IDE.png?height=600&name=How%20to%20Consume%20an%20OData%20Service%20from%20a%20Cloud%20System%20in%20SAP%20Web%20IDE.png)](https://blog.sap-press.com/how-to-consume-an-odata-service-from-a-cloud-system-in-sap-web-ide)

[Programming](https://blog.sap-press.com/tag/programming)

## [How to Consume an OData Service from a Cloud System in SAP Web IDE](https://blog.sap-press.com/how-to-consume-an-odata-service-from-a-cloud-system-in-sap-web-ide)

[Read More](https://blog.sap-press.com/how-to-consume-an-odata-service-from-a-cloud-system-in-sap-web-ide)

[![Introduction to OData in SAP](https://blog.sap-press.com/hs-fs/hubfs/Introduction%20to%20OData%20in%20SAP%20(2).png?height=600&name=Introduction%20to%20OData%20in%20SAP%20(2).png)](https://blog.sap-press.com/introduction-to-odata-in-sap)

[Programming](https://blog.sap-press.com/tag/programming)

## [Introduction to OData in SAP](https://blog.sap-press.com/introduction-to-odata-in-sap)

[Read More](https://blog.sap-press.com/introduction-to-odata-in-sap)

**Subscribe to our blog!**Get notified about future blog updates.

- <https://www.facebook.com/sappress>
- <https://twitter.com/sappress>
- <https://linkedin.com/company/sap-press>
- <https://www.instagram.com/sap_press/>
- <https://blog.sap-press.com/rss.xml>

### The official SAP PRESS Blog

As the world’s leading SAP publisher, SAP PRESS’ goal is to create resources that will help you accelerate your SAP journey. The SAP PRESS Blog is designed to provide helpful, actionable information on a variety of SAP topics, from SAP ERP to SAP S/4HANA. Explore ABAP, FICO, SAP HANA, and more!

### SAP Blog Topics

- [All Topics](https://blog.sap-press.com)
- [Logistics](https://blog.sap-press.com/tag/logistics)
- [Programming](https://blog.sap-press.com/tag/programming)
- [FICO](https://blog.sap-press.com/tag/fico)
- [Administration](https://blog.sap-press.com/tag/administration)
- [Business Intelligence](https://blog.sap-press.com/tag/business-intelligence)
- [What Is?](https://blog.sap-press.com/tag/what-is)
- [Featured](https://blog.sap-press.com/tag/featured)
- [CRM & Sales](https://blog.sap-press.com/tag/crm-sales)
- [Video](https://blog.sap-press.com/tag/video)
- [Human Resources](https://blog.sap-press.com/tag/human-resources)

### Blog curated by

[![Rheinwerk Publishing & SAP PRESS Logo](https://blog.sap-press.com/hubfs/rheinwerk-sappress-logo-header-1.svg)](https://sap-press.com) [Visit the SAP PRESS Store](https://sap-press.com)

### About

- [Home](https://sap-press.com/)
- [About Us](https://sap-press.com/the-publisher/)
- [Contact](mailto:info@rheinwerk-publishing.com)
- [Legal Notes](https://sap-press.com/legal-notes/)
- [Privacy Policy](https://sap-press.com/privacy/)
- [Terms of Use](https://sap-press.com/terms/)
- [Guest Posting](https://blog.sap-press.com/guest-posting)

© 2026 Rheinwerk Publishing, Inc. | Change Privacy Options

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "SAP PRESS",
    "url" : "https://blog.sap-press.com/author/sap-press"
  },
  "dateModified" : "2026-08-24T16:40:22.170Z",
  "datePublished" : "2020-03-09T13:00:00.000Z",
  "headline" : "How to Create an OData Service and Exposing CDS Views as an OData Service",
  "image" : [ "https://blog.sap-press.com/hubfs/How%20to%20Create%20an%20OData%20Service%20and%20Exposing%20CDS%20Views%20as%20an%20OData%20Service.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.sap-press.com/how-to-create-an-odata-service-and-exposing-cds-views-as-an-odata-service",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.sap-press.com/hubfs/Logo-1.jpg"
    },
    "name" : "Rheinwerk Publishing, Inc."
  }
}
```