"No fields have changed" because you edited an offline entity instance, that you've just built yourself.
To get your example working little adjustments have to made:
OutbDeliveryItem item = OutbDeliveryItem.builder()
.deliveryDocument("some key")
.deliveryDocumentItem("some key")
.build();
// The following method registers a change of the entity.
item.setActualDeliveryQuantity(BigDecimal.TEN);
// Then execute the actual update operation, which only uses the actually changed fields.
service
.updateOutbDeliveryItem(item)
.execute(someDestination);
If the service is complaining about missing ETag provided, either follow the example described further below using the get-by-key appraoch. Or you explicitly tell the request to ignore the version identifer:
service
.updateOutbDeliveryItem(item)
.ignoreVersionIdentifier()
.execute(someDestination);
That's it!
Alternatively, in order to implement the complete OData update workflow, you need to first get the entity by using the get-by-key method as described below.
String deliveryDocument;
String deliveryDocumentItem;
HttpDestinationProperties someDestination;
// First get the item by key.
OutbDeliveryItem item = service
.getOutbDeliveryItemByKey(deliveryDocument, deliveryDocumentItem)
.execute(someDestination)
// The following method registers a change of the entity.
itme.actualDeliveryQuantity(BigDecimal.TEN);
// Then execute the actual update operation, which only uses the actually changed fields.
service.updateOutbDeliveryItem(item).execute(someDestination);
This way, the ETag will be set internally. The entity version identifier is a requirement for most S/4 OData services to enable update/delete operations.
Note: You are not limited to get-by-key. You can also use the get-all method with filters to resolve multiple entities, in preparation for further update changes.