I want to create a header with its 2 associations in one go.

My behaviour class exists, the "create" on the root entity is called properly and twerks nicely.

But the passed parameter for creation (the structure of the header with the generated clsid field at the beginning, the CONTROL fields at the end and the header payload in between) somehow seems to be missing the associated children (as nested table), and if I pass them, i can inspect the "illegal param error" in the error_logs (obvious).

My call from the client code is:

enter image description here

I wonder, how can I trigger the generated method in my bevaviour class, properly, from clientside (the generated code, no worries... the implementations do have code, but are never called).

enter image description here

The topmost consumption views:

enter image description here

Assocs:

enter image description here

The positions itself refer back to the header:

enter image description here

Is this even possible at all, from client code ? I do not have any (local) metadata extensions, I do use the rap approach with a bit of freestyle, ( does not matter, why ) and from my research of the api-documentation, it should be possible to trigger "cba" from the client code , i simply cannot figure out, how...

Anyone a clue ?

EDIT: I figured out, that NONE of my exposed entities in the service has a visible link icon to it's assocs... maybe I start over with this ...

EDIT: No even with a proper link ( or so called navigaion property ) it does not work. I recreated another business object structure according to this and in the official book is written CITE:

...*Create access is only allowed for compositions. {...} It means, that child nodes can be created via their parent node, but ... *

Seems to be wrong though.

I followed this tutorial ( but with my data model ), where I now can see the links in the publisher BUT nevertheless, still no invoking of the generated method "cba" ...

https://blogs.sap.com/2020/09/17/build-composition-tree-with-abap-cds-views/

0

There are 0 answers