28 apr

ETag (Concurrency Control)


E-invoicing in Germany: How to implement the obligation with SAP Business One

ETag stands for Entity Tag and is an HTTP header that transports a current version identifier of a resource. In REST and OData APIs, it is primarily used for optimistic concurrency control: The clients A resource can only be modified if its ETag still matches the server-side version. This prevents overwrites of parallel changes without the server having to hold server-side locks.

Context

The process in practice: the client calls a resource via GET and receives in the response header a ETag: "123abc". If he changes them, he sends at PATCH or PUT the header If-Match: "123abc" If the current server ETag still matches, the change is executed and a new ETag is returned. If someone else has written in the meantime, the server responds with HTTP 412. Precondition Failed; The client must reload the current state, resolve the conflict, and try again. In the SAP Business One Service Layer, this pattern is relevant when multiple integrations write to the same business partner, item, or open document simultaneously, such as a webshop sync, the ERP front-end, and a migration tool. ETags are automatically generated in OData for entities with configured concurrency properties; on the client-side, a wrapper is recommended that If-Match consistently sets and transfers 412 responses into a reload-and-retry flow.

Demarcation

ETag-based concurrency is optimistic: there is no locking, conflicts are only detected when writing. This distinguishes it from pessimistic locking (e.g. SELECT FOR UPDATE), which in the Database or enforced by a blocking service. ETags are also not a cache-control mechanism in the strictest sense, although they are related to If-None-Match Additionally, support HTTP caching. And they do not replace functional consistency checks: that two write operations follow one another technically cleanly does not mean that the content result is correct – for that, validations and transaction boundaries in the server remain mandatory.


Humans and AI

SAP KI Vision: The Autonomous Enterprise

Hardly a week goes by without the announcement of more intelligent language models, new co-pilots or more powerful AI agents. Nevertheless, SAP CEO Christian Klein states in...
Crystal Reports for AI

Crystal Reports on AI

Anyone developing their own reports in SAP Business One quickly encounters the same problem: The B1 database schema is extensive, Crystal Reports has...
AI in the company

Why companies are hesitant about AI in ERP

Artificial intelligence in the ERP context raises high expectations, as significant productivity gains, far-reaching automation and more informed decisions are on the cards. Nevertheless ...
Predictive maintenance

Predictive maintenance: how to turn SMEs into smart factories

In today's intelligent world, the ability to solve problems before they even arise is no longer a futuristic scenario, but ...
RPA

RPA in the ERP environment: increasing efficiency through digital process assistants

Many ERP systems run processes on a daily basis that are necessary but do not add value. Employees spend valuable time processing orders ...
Generative AI in ERP

Generative AI in ERP: How LLMs are changing the role of ERP systems

With the advent of generative AI and large language models (LLMs), the role of ERP systems is changing fundamentally. Instead of ...
Wird geladen …