OData V4 Model Part 2: Batch Groups, Updates and Saving Changes
Preview · a free account unlocks the full lesson
Control when the V4 model sends changes: $auto, $direct and application group IDs, deferred updates submitted with submitBatch, creating and deleting entities, and how to give users a clear save or cancel experience.
Visual overview
Explanation
Part 1 covered reading data; Part 2 covers writing it, and controlling exactly when requests are sent, through batch groups, updates and saving changes.
Each binding and change belongs to a batch group. $auto collects requests and sends them automatically in a $batch at a suitable time. $direct sends requests individually and immediately, without batching. The default update group can be configured for the model as a whole.
If the update group is instead an application-defined group, such as "changes," edits accumulate locally until the app explicitly calls submitBatch('changes'). This is what supports an explicit Save button: the user edits several fields and rows, and only then saves everything in one batch — or cancels everything with resetChanges, which discards pending changes for a group or binding.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
More lessons in this topic
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.