cancel
Showing results for 
Search instead for 
Did you mean: 

SAP OData Versioning

former_member214276
Participant
0 Kudos

Hi all,

For my customer, we have following requirements:

We have to build a webservice, accessible to 3 consumer, that will gradually evolve to other consumers, but will also evolve in logic/fields to output.

In global API best practices, to achieve this, versioning is used.

I have been trying and looking into the 'extend OData service (gateway) option in SEGW, but can't achieve this result.

I tested with a basic structure (SE11) with 3 fields, created a version 0001 and tried to extend this service (while adapting the structure to 5 fields) to output 5 fields. However, I only get to see the original 3 fields.

The idea would be that if you call the service with v=0001, you get 3 fields, with v=0002, you get 5 fields. This way, we avoid impact on other parties, while offering the same webservice to all parties.

Am I doing this the correct way? Are there other options?

Accepted Solutions (0)

Answers (1)

Answers (1)

Rodrigo-Giner
Active Contributor
0 Kudos

Hi Jan,

You are on the right track you could accomplish what you what BUT:

  1. You can´t have a same service with more than 1 versions, so even if you extend a service you always create a new service name, so in your app you will have to handle wich service to use.
  2. When you generate the runtime artifacts you will see a checkbox that says Overwrite Base/Extended Service. DON´T CHECK IT.
    if you check this checkbox you overwrite your base service, so when you call the base service you will be redirected to the new one
    if you uncheck this checkbox you generate a new service, so is like having 2 different service, but you save the time to do all from scratch

EDIT: I found out that you have the option to COPY a project
https://help.sap.com/viewer/68bf513362174d54b58cddec28794093/1709%20002/en-US/8b816011eb7c4ce9a622ec...

So I think the best solution for you would be to use 3 different service, because you can´t use different "versions" on a same service