Skip to Content
0
Former Member
Jul 02, 2015 at 08:13 AM

Unable to bind Json Data.

69 Views

Hi Experts,

I have a Json formate like below

{

"SalesOrderCollection": [

{

"SoId": "300000097",

"ApprovalStatus": "",

"Status": "Initial",

"ConfirmationStatus": "",

"BillingStatus": "Initial"

"LineItems": [

{

"SoItemPos": "300000000",

"Quantity": "10",

"GrossAmount": "1137.64",

"BuyerName": "956.00",

"TaxAmount": "181.64"

},

{

"SoItemPos": "300000000",

"Quantity": "20",

"GrossAmount": "61.88",

"BuyerName": "52.00",

"TaxAmount": "9.88",

}

]

]

}

I am able to bind the values from "SalesOrderCollection" array to Table, but i am unable to bind the values from "LineItems" array to the same Table.

Can any one help me how to bind the values from "LineItems" array.

Please find the below code for reference.

<Table growingThreshold="5" growing="true" items="{/SalesOrderCollection}">

<columns>

<Column>

<Text text="Product" />

</Column>

<Column >

<Text text="Supplier" />

</Column>

<Column>

<Text text="Dimensions" />

</Column>

<Column>

<Text text="Weight" />

</Column>

<Column>

<Text text="Price" />

</Column>

</columns>


<items>

<ColumnListItem>

<cells>

<Input value="{SoId}" />

<Input value="{ApprovalStatus}" />

<Input value="{ConfirmationStatus}" />

<ComboBox items="{trim>/color}" width="8.5rem">

<items>

<sap.ui.core:Item key="{}" text="{/SalesOrderCollection/LineItems/SoItemPos}"/>

</items>

</ComboBox>


<Input value="{BillingStatus}" />


</cells>

</ColumnListItem>

</items>

</Table>

Thanks and Regards

Mohanbabu D