Skip to content

OData V2, OData V4 and RAP: what is the difference?

SAP offers data through OData services. Version 2 is the familiar standard, version 4 the more modern successor, and RAP is the way SAP builds new services.

In brief

OData is an open standard for offering and editing data over the web: a kind of REST with fixed conventions for filtering, sorting and paging. SAP uses OData for Fiori apps and for integrations with other systems. There are two versions in circulation, and a new way of building.

OData V2

  • The version most existing SAP services are built with.
  • Developed in SAP with the SAP Gateway Service Builder (transaction SEGW), or derived from CDS views.
  • Widely supported by tools and low-code platforms; OutSystems also works with SAP OData.

OData V4

  • The newer standard, more efficient and richer: better support for searching, actions and related data in a single request.
  • A different notation from V2. An integration built for V2 therefore does not simply work with V4.
  • The version SAP is moving towards for new development.

RAP

RAP, the ABAP RESTful Application Programming Model, is the modern way to build services in SAP. You describe the data model with CDS and the behaviour (create, update, checks) in a fixed structure. RAP publishes that as an OData service, usually V4. It works in S/4HANA and in SAP's cloud editions.

A decision model per release

  • ECC and older NetWeaver systems: classic OData V2 via SAP Gateway, often as a wrapper around existing functions, or direct RFC integrations.
  • S/4HANA (from 1909): RAP with OData V4 for new objects; for existing logic a classic wrapper can still make sense.
  • SAP in the cloud (ABAP Cloud): RAP is the norm there.

If you serve several SAP systems, you can also put your own platform-independent API layer on top of SAP that works the same on every release.

What should you choose

Which option is possible depends on the version of your SAP system. A good SAP integration therefore starts with finding out what the system supports.

  • Existing integration on V2? Leave it as it is while it works; rebuilding costs money without any direct gain.
  • New development in S/4HANA? Build with RAP and V4; that is the direction SAP is taking.
  • Integrating from another system? Check which version that system supports, and whether a standard SAP API already exists before you build something yourself.

What to watch out for

OData is made for apps that display and edit data. For large volumes of data or heavy background processing, a different integration type is often better. Choosing the right integration architecture prevents integrations that put unnecessary load on your SAP system.

Would you like advice on OData and RAP? Request a free advice conversation.

Updated on