Hi!
In your example, this :
JOIN(Dtl:AcctKey,Cus:AcctNumber)
PROJECT(Dtl:Item,Dtl:Quantity)
END
JOIN(Pro:ItemKey,Dtl:Item)
PROJECT(Pro

escription,Pro

rice)
END
needs to be:
JOIN(Dtl:AcctKey,Cus:AcctNumber)
PROJECT(Dtl:Item,Dtl:Quantity)
JOIN(Pro:ItemKey,Dtl:Item)
PROJECT(Pro

escription,Pro

rice)
END
END
So if your requirement is to retrieve all the child tables of the parent table, you might need seperate views or all your records will be duplicated. Maybe a view is not necessary as you loop thru all the child tables.
SET(ParentFileKey)
LOOP
NEXT(ParentFile)
IF ERRORCODE() OR <break condition> THEN BREAK.
CLEAR(Child1Record)
<assign child 1 linking fields from parent>
SET(Child1ParentKey, Child1ParentKey)
LOOP
NEXT(Child1File)
IF ERRORCODE() OR Child1LinkFields <> ParentFields THEN BREAK.
END
CLEAR(Child2Record)
<assign child 2 linking fields from parent>
SET(Child2ParentKey, Child2ParentKey)
LOOP
NEXT(Child2File)
IF ERRORCODE() OR Child2LinkFields <> ParentFields THEN BREAK.
END
...
END
Regards