‎2022 Sep 04 3:11 AM
Dear Experts:
I am studying Path Exprssion Attributes with below example.

I have got a very big confusion when I change the cardinality in the example. I got some different results with different cardinalities. Are there any experts can explain the REASONs?
My scar, spfli, sflight, sairport are below.

My doubtful SQL case1:
WITH
+pathexpresson AS ( SELECT scarr~carrname,
\_spfli[ (1) ]-connid AS connid,
\_spfli[ (*) ]\_sflight[ (*) ]-fldate AS fldate,
\_spfli[ (*) ]\_sairport[ (1) ]-name AS name
FROM demo_cds_assoc_scarr AS scarr
WHERE scarr~carrid = 'AA'
ORDER BY carrname, connid, fldate
)"
SELECT carrname,connid,fldate,name FROM +pathexpresson INTO TABLE @DATA(lt_c01).
The result is

I think the LFDATE=2021-05-08 is a wrong data. Why can it be output?
My doubtful SQL case2:
WITH
+pathexpresson AS ( SELECT scarr~carrname,
\_spfli[ (1) ]-connid AS connid,
\_spfli[ (1) ]\_sflight[ (*) ]-fldate AS fldate,
\_spfli[ (*) ]\_sairport[ (1) ]-name AS name
FROM demo_cds_assoc_scarr AS scarr
WHERE scarr~carrid = 'AA'
ORDER BY carrname, connid, fldate
)"
SELECT carrname,connid,fldate,name FROM +pathexpresson INTO TABLE @DATA(lt_c01).
The result is

I think the NAME= San Francisco Int Apt,USA is a wrong data. Why can it be output?
Waiting for your answers. Thank you very much!
‎2022 Sep 04 11:15 AM
For people interested to see more from the ABAP documentation:
Link 1: ABAP documentation (structure up to ABAP 7.54): ABAP CDS - path_expr, attributes