Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2638

Re: Create Deep Entity - Custom code

$
0
0

Possibly a misunderstanding here (by one of us), but I think you want to post more than one order plus items at a time? That is a different scenario.

If this is so, you cannot do it in the way you are attempting. The clue is in the method name CREATE_DEEP_ENTITY (singular) - you create one starting entity and all of the required sub-branches.

If you wish to place more than one deep insertion into a request, you have to consider $batch or a revision of your model. For the latter you could define an entity called MassInsertOrder, which would thereby enable you to have the orders and items as the sub-branches. MassInsertOrder is a virtual entity and does not represent a persistent backend object - as such you could only POST to it or return a dummy on GET.

$batch is a safer option as it supports SAP LUW processing and won't commit until the whole request is done.

 

Re; the H2Guide, it's rather old and overly complex. It doesn't use service builder and could be done with a lot less coding. Maybe not the best example if you are still learning, but I know there aren't many examples to crib from. I'm not sure why you have a problem with the backend creation function, the example code here uses a useable function for the job.

 

If I were you I would get a single deep inserted order working before considering any mass processing - you would not need to rework much, if anything.


Viewing all articles
Browse latest Browse all 2638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>