Skip to Content
0
Nov 16, 2015 at 09:44 AM

How to show data in detailFragment with other entity?

35 Views

I have SAPUI5 application project with Master-Detail template and I have a service which has two entities WO1 and WO2. Both are linked with OrderNumber.

Master contains data from WO1 with primary key OrderNumber.

Detail contains table , you can see at bottom showing columns like operation,description,status and assignedTo. The data comes from WO2 based on orderNumber, when user selects order from Master. (Note: One order contains multiple operation)

The Fragment which contains table in Detail section is created in other file.

How can I get data in fragment table based on order selected in master.

Following is the Fragment code

<core:FragmentDefinition height="100%" width="100%" xmlns:core="sap.ui.core" xmlns:f="sap.ui.layout.form" xmlns:l="sap.ui.layout"

xmlns="sap.m">

<Panel>

<ObjectHeader number="" numberUnit="Items" title="{Orderid} - {ShortText}">

<ObjectAttribute text="{Equipment} - {EquipmentDesc}" title="Equipment"/>

<ObjectAttribute title="Start" text="{StartDate}"/>

<ObjectAttribute title="End" text="{FinishDate}"/>

<ObjectAttribute title="Planner Group" text="{PlanGrpDesc}"/>

<ObjectAttribute title="Work Center" text="{WorkCenterDesc}"/>

<ObjectAttribute title="Notification" text="{NotifDescription}"/>

<ObjectAttribute title="User Status" text="{Userstatus}"/>

</ObjectHeader>

<Table id="idProductsTable"

inset="false">

<columns>

<Column

width="12em">

<Text text="Operation" />

</Column>

<Column

minScreenWidth="Tablet"

demandPopin="true">

<Text text="Description" />

</Column>

<Column

minScreenWidth="Tablet"

demandPopin="true"

hAlign="Left">

<Text text="Status" />

</Column>

<Column

minScreenWidth="Tablet"

demandPopin="true"

hAlign="Left">

<Text text="Assigned To" />

</Column>

</columns>

<items>

<ColumnListItem>

<cells>

<Text

text="{Activity}" />

<Text

text="{Description}" />

<Text

text="{SystemStatusText}" />

<Text

text="{WorkCntr}" />

</cells>

</ColumnListItem>

</items>

</Table>

</Panel>

</core:FragmentDefinition>

Attachments

c1.PNG (44.9 kB)