OData Gateway
Architect / Cross-trackintermediate

Batch, $expand and Deep Insert

Efficient OData patterns for Fiori.

Explanation

$batch groups multiple OData calls in one HTTP round-trip. $expand returns navigation-related entities in a single response (header + items). Deep insert saves a header and its items in one POST. Together these reduce network chatter and are critical for good Fiori UX.

Code example

ABAP Code
POST /sap/opu/odata/sap/ZORDER_SRV/$batchContent-Type: multipart/mixed; boundary=batch1

Real project scenario

Fiori order-entry app cut 12 sequential calls to a single $batch, halving perceived latency.

Common mistakes

Iterating client-side instead of $expand; large deep inserts causing timeouts.

Best practices

Test with /IWFND/GW_CLIENT; monitor call volume with /IWFND/STATS.

Interview angle

Difference between $batch and $expand.