Skip to Content
Jun 21, 2018 at 09:51 PM

How do we create a new Child node without updating or creating the root node in SAP Gateway Client?



I have a parent entity and a child entity in my oData Service that was created using CDS views.

The scenario is to be able to just add a new child node to an existing root node. How could we do this in the SAP Gateway Client.

I tried the POST operation on the Child entity Set by providing the Parent key and other field values but I got an error message 'Invalid method invocation: 'CREATE' method is called on the non-root entity 'ZXXXXXXX''.

I tried calling PUT at root entity level and tried to pass child node values but that failed too.

So how would we deal with this scenario? Please guide.

Best Regards,