cancel
Showing results for 
Search instead for 
Did you mean: 

What are Best Practices for SAP Gateway

majcon
Active Participant
0 Kudos

Hi NG,

I`m interesting in Best Practices when using SAP Gateway (and of course avoiding unpleasant situations ;-))

Maybe someone could guide to to some information?

Following questions are on topic:

  • Versioning of Services (when to do, maybe when releasing some official Services?)
  • On going improvement of existing services (something to avoid?)
  • Release-Management with multiple consumer (and imagine you only have the SAP Gateway as Infrastructure...)
  • Preconditions for consumer (consuming oData only with Json instead of XML or something similar weird ;-))
  • anything else that´s important

Thanks in advance for your guidance!

BR,

Damir

Accepted Solutions (1)

Accepted Solutions (1)

former_member184867
Active Contributor
0 Kudos

Here are some thoughts

Regarding Versioning

==========================

The Data Model exposed by an OData Service defines a contract between the OData service and its clients. Services are allowed to extend their model only to the degree that it does not break existing clients. Breaking changes, such as removing properties or changing the type of existing properties, require that a new service version is provided at a different service root URL for the new model.

The following Data Model additions are considered safe and do not require services to version their entry point.

  • Adding a property that is nullable or has a default value; if it has the same name as an existing dynamic property, it must have the same type (or base type) as the existing dynamic property
  • Adding a navigation property that is nullable or collection-valued; if it has the same name as an existing dynamic navigation property, it must have the same type (or base type) as the existing dynamic navigation property
  • Adding a new entity type to the model
  • Adding a new complex type to the model
  • Adding a new entity set
  • Adding a new singleton
  • Adding an action, a function, an action import, or function import
  • Adding an action parameter that is nullable
  • Adding a type definition or enumeration
  • Adding any annotation to a model element that does not need to be understood by the client in order to correctly interact with the service

This is from the OData V4 documentation, however also applies to OData V2 based on the nature of change.

Clients SHOULD be prepared for services to make such incremental changes to their model. In particular, clients should be prepared to receive properties and derived types not previously defined by the service.

Services SHOULD NOT change their data model depending on the authenticated user. If the data model is user or user group dependent, all changes MUST be safe changes as defined in this section when comparing the full model to the model visible to users with restricted authorizations.

Ongoing Improvements of Existing Service

===============================

This should be fine if the ongoing improvements does not break anything. If the modifications are safe (as described above) they are fine. However the consumer clients should not complain about something new in the Service , clients should ignore information from OData if they are not relevant - this is called Robustness Principle https://en.wikipedia.org/wiki/Robustness_principle .


Release-Management with multiple consumer

====================================

Is is same as any other object in SAP world being managed by transport. If multiple consumers use the same OData service they are are impacted (based on the nature of change) bu the change of the Service.  

Preconditions for consume

====================================

There is not enough space for weird preconditions. OData is pretty standard , and they are not designed specific to the clients. Custom code may do the job to some extent. However Gateway Odata supports both  xml and json, based on the request received from the consumer. So this a call of the consumer rather than an enforcement by the server.


 

Answers (1)

Answers (1)

former_member190010
Contributor
0 Kudos

Hi Damir,

I would recommend paying a look to the following posts:

helpSAP:

Creating High-Quality OData Services - SAP NetWeaver Gateway - SAP Library

OData Best Practices - SAP NetWeaver Gateway - SAP Library

SCN

Hope this helps.

Best Regards,

Emanuel