SAP OData POST a parent and its children

0
Hello, I have created an application that consumes an OData service. I am trying to POST a parent entity and its children, but the Create activity of the 'SAP OData Connector' module only allows creating the parent without its children, so consequently I get a 400 error. Is there a solution?
asked
3 answers
0

Hi Judith

Will you give a little more information about how you are doing the POST?  Have you seen this (Deep Create)?  A lot depends on how the OData service is implemented in the backend too, so it is difficult to say without a little more context.

Gustav

answered
0

I followed this course where it explains how to do it and applied it to my own application: https://academy.mendix.com/link/path/32/Learn-to-Build-an-SAP-App (5.1.3 y 5.1.4)

In my application, a microflow opens the page of the form in which I fill in the parent's data and the child's data, as explained in the course:

 

The save button calls this other microflow, passing it as an argument the object:

 

and this is what I have in the create action:

 

With all this I receive a 400 error informing that no children have been sent ("No se han transferido posiciones"):

answered
0

Looking at the message you are getting it looks like an SAP business logic message. The message class of the error message is M7/300.  If you open transaction SE91 in SAP and use M7 as the message class and look at message number 300, it states that “No items were transferred” ("No se han transferido posiciones").  I recommend putting an external breakpoint in the ABAP of your OData service. It is most likely an SAP standard class or function module that is expecting something that your application is not passing through.  The error is likely to be produced by function module MB_CREATE_GOODS_MOVEMENT.  I would then move that back to the Mendix application to see what is not being passed correctly.

answered