Skip to Content
0
Jul 22, 2019 at 08:22 AM

Use attribute from different entity as attribute in view

53 Views Last edit Jul 22, 2019 at 08:23 AM 2 rev

Dear fellow Sappies,

I defined two entities (and the corresponding entity sets) in the SAP Gateway, e.g.:

Entity Set: PERSONSet

ID | First Name | Last Name | City
---|------------|-----------|----------------
1  | John       | Doe       | New York
2  | Chris      | Parker    | Washington D.C.

---

Entity Set: MEETINGSet

ID | Person1 | Person2 | City
---|---------|---------|----------
1  | 1       | 2       | San Diego
2  | 2       | 1       | Florida

Now, I want to display all the meetings in a SAPUI5 table like this:

<Table items="{/MEETINGSet}">
    <columns>
        <Column>
            <header>
                <Text text="Person 1"/>
            </header>
            <footer/>
        </Column>
       <Column>
            <header>
                <Text text="Person 2"/>
            </header>
            <footer/>
        </Column>
        <Column>
            <header>
                <Text text="City"/>
            </header>
            <footer/>
        </Column>
    </columns>
    <items>
        <ColumnListItem>
            <cells>
                <Text text="[Last name of Person 1]"/>
                <Text text="[Last name of Person 2]"/>
                <Text text="{City}"/>
            </cells>
        </ColumnListItem>
    </items>
</Table>

How can I access the attributes of the other table, although my table items are from /MEETINGSet?

I thougt about something like

text="{
    path: "/PERSONSet"
    parameters: ???
}"

But unfortunately, I am stuck.

Thank you for your help!