Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

SAP EWM Help Latest Questions

  • 0
  • 0
DPM125

Ways to Create OData Services in SAP

1. Using SEGW (Service Gateway Builder) – Traditional Approach

  • Transaction code: SEGW

  • Steps:

    1. Create a new project in SEGW.

    2. Define Data Model (Entity Types & Entity Sets).

    3. Map Entities to ABAP structures/tables.

    4. Implement CRUD operations in DPC (Data Provider Class).

    5. Register and activate the service in /IWFND/MAINT_SERVICE.

  • ✅ Use Case: Legacy SAP systems, custom OData for ECC or S/4HANA on-prem.

  • ❌ Limitation: Manual coding, more effort, less aligned with modern RAP.

2. From ABAP CDS Views (Annotation-Based Exposure)

  • Use annotation:

@OData.publish: true
define view entity Z_SalesOrder as select from I_SalesOrder { … }

 

  • The CDS View is automatically published as an OData service.

  • Then activate the service in /IWFND/MAINT_SERVICE.

  • ✅ Use Case: Quick and simple OData exposure from CDS Views.

  • ❌ Limitation: Only read-only services, no transactional behavior.

3. Using the RAP (RESTful ABAP Programming Model)

  • RAP provides managed OData services with end-to-end support:

    1. Define CDS Data Model (Root & Projection Views).

    2. Define Behavior Definition (CRUD operations, determinations, validations).

    3. Create Service Definition to expose data.

    4. Create Service Binding (OData V2/V4) and publish.

  • ✅ Use Case: Modern SAP S/4HANA Cloud / On-Prem for transactional + analytical apps.

  • ❌ Limitation: Available only in S/4HANA and requires ABAP on Eclipse (ADT).

4. Using SAP Gateway Service Builder + RFC/BAPI

  • Wrap an RFC or BAPI in SEGW to expose as OData.

  • Often used in integration scenarios.

  • ✅ Use Case: Exposing existing RFC/BAPIs as REST APIs.

  • ❌ Limitation: Old-school approach, less future-proof.

Related Questions

Leave an answer

Leave an answer