cancel
Showing results for 
Search instead for 
Did you mean: 

How to Posting Data Header and Multiple Item Using MDK to SAP Backend System?

antoniuspj04
Explorer
0 Kudos
Hello everyone, Now I have an assignment to explore the Cellular Development Kit. I have followed the tutorial given in the developer sap. At the moment I am developing an application to provide the process of receiving goods, which requires the ability to post data header and items using a single request. Does anyone have a solution for my case? Maybe you have a related case (post header item using mobile development kit), will you share with me how to make it using a mobile development kit? Thank you very much for your response and kindness.
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Help me in understanding your requirement. Do you want to create for example, a SalesOrder and also it's related Item?

antoniuspj04
Explorer
0 Kudos

jitendrakumar.kansal Yes, like that. How do we post data such as SalesOrder and it's related items to SAP backend? Which feature are used in the MDK?

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

antoniuspj04

All MDK actions have an OnSuccess and OnFailure handler properties. The OnSuccess property is used to chain together multiple actions.

You can call CreateEntity action to create SalesOrders. As Items is child of SalesOrders, you can use CreateRelatedEntity action to create related Items. You can simply set the OnSuccess for the CreateSalesOrder to call CreateItems.

antoniuspj04
Explorer
0 Kudos

jitendrakumar.kansal

So we have to call two actions to post data header and items to SAP Backend?

In my understanding from your answer:
CreateEntity (SalesOrder) -> ActionMessage Success -> CreateRelatedEntity (SalesOrders Items)

Is that true?

Thank you.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

yes, right

0 Kudos

Hi jitendrakumar.kansal,

for creating an entity "Order" with child "OrderLines", we tried that approach, too. At first, we created the order entity and after that, with "OnSuccess", we chained the entity creation of the child with "CreateRelatedEntity" action.

However, after creation, after we synchronized the data towards the backend, the entities have been sent in two separate POST-requests and therefore, an error occurred, because the created entities could not be created in the backend. We assume, that the linkage between the two posts we sent to the backend cannot be done correctly.

Do you have any idea, how we can overcome this problem?

Thank you in advance and best regards,

Sher-Chan

Answers (0)