SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Create and Deep Insert with the Virtual Data Model for OData

Create and deep insert functionality for OData as supported by the SAP S/4HANA Cloud SDK.

Overview

🎓 intermediate 30 min. SAP Cloud SdkIntermediate

You will learn

  • โœ”How to build up a complex data structure using the virtual data model
  • โœ”How to write deeply nested data to SAP S/4HANA in a single call
  • โœ”How to write unit and integration tests for deep insertion
Charles Dubois C Charles Dubois November 15, 2024
Created by January 13, 2020
Contributors

Prerequisites

Prerequisites

Please note that the sandbox service does not support testing creating entities, you might have to use an actual S/4 system to try the tutorial out.

Steps

Intro

Use advanced features of the Virtual Data Model for OData.


Step 1 Motivation
โ€”

Deep Insert is defined as:

  • A request to create an entity that includes related entities, represented using the appropriate inline representation, is referred to as a deep insert.

  • On success, the service MUST create all entities and relate them.

  • On failure, the service MUST NOT create any of the entities.

This means deep insert is an atomic operation that is either successful or fails for all entities.

Step 2 Write the application code
+
Step 3 Write an integration test
+
Step 4 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Motivation 2. Write the application code 3. Write an integration test 4. Test yourself

Learn more →