cancel
Showing results for 
Search instead for 
Did you mean: 

EML Deep Insert

jordi_candel
Explorer
0 Kudos

Hello everyone, I have 3 entities. A root entity X with an association to entity Y, and this in turn with an association to entity Z.

Root Entity X -----assoc[0...*]---> Entity Y -----assoc(0..*)----> Entity Z

Now I would like to create several instances of entity Z in RAP DRAFT mode via MODIFY ENTITIES. Can someone explain to me what the exact EML syntax looks like for this?

I tried sevral Options but nothing seems to work 😞

Thank you and best regards.

View Entire Topic
j_pavan_kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Goluef,

Please call EML in the below format for your use case.

Syntax for CREATE (BY association)
MODIFY ENTITIES OF RootEntityName  " name of root CDS view 
  ENTITY entity_1_name             " alias name
    CREATE FROM it_instance1_c 
    CREATE BY \association1_name  FROM it_instance1_cba 
      ...
  ENTITY entity_2_name             " alias name
    CREATE BY \association2_name  FROM it_instance2_cba
     ...
  [FAILED   DATA(it_failed)] 
  [MAPPED   DATA(it_mapped)] 
  [REPORTED DATA(it_reported)].
Thanks,Pavan