2020 May 16 9:24 AM
hi,
can you help me with the annotations on my projection view, as i would like to calculate the flight date via IF_SADL_EXIT_CALC_ELEMENT_READ (Class name is ZAMDP_FLIGHT)
i'm just trying with this exercise but can't seem to activate it due to an error - "Basis entity must have a ROOT property or a TO PARENT association"
2020 May 16 9:33 AM
2020 May 16 10:18 AM
Hi,
I'm not really sure if you can use the @ObjectModel.CompositionRoot as you are doing in zddl_next_flight. Looking at the documentation I would expect only true or false is possible.
You can also have a look at following example, which uses a root and child entity.
Best regards,
Geert-Jan Klaps
2020 May 17 11:07 PM
The example shows the correct modelling with the associations towards child, parent and root and the usage of annotation @ObjectModel.association type. However these are important for transactional processing... virtual elements are quite independent of it, for them you do not necessarily need these annotations.
2020 May 17 11:12 PM
With respect to filter transformation, there is an example on the blog post https://blogs.sap.com/2020/01/16/filtering-on-association-property-in-fiori-element-app-via-abap-cds...
With respect to the calculation exit, there are two ways to code: