Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

OData binding issue

Hi Friends,

It is an OData binding issue.

I am trying to display data of salesorderitems in the sap.m.table but was not able to bind using bind aggregation.

what i am trying to achieve is , for a given business partner there will be multiple sales order and each order will have multiple sales order items i want to bind those items in the sap.m.table using bind aggregation.

URL:https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZCD204_EPM_DEMO_SRV/BusinessPartners(%270100000008%27)/SalesOrders?$expand=SalesOrderItems

i have attached a screenshot in which i have marked the section which contains the data i need to read. that will be available in the above link.

code snippet for binding :

var model =sap.ui.model.odata.ODataModel("proxy/https/sapes1.sapdevcenter.com/sap/opu/odata/sap/ZCD204_EPM_DEMO_SRV/",true,'username','password'); 

App.setModel(model);

  pastOrder_S3.bindAggregation("items","/BusinessPartners('"+businessPartnerId+"')/SalesOrders?$expand=SalesOrderItems",oTemplate_S3);

  new sap.m.Text({

          text:"{SalesOrderItems\ProductName} \n {SalesOrderItems\ProductId}"

         }),        

         new sap.m.Text({

          text:"OrderId: {SalesOrderID} \n {DeliveryDate} \n {TotalSum}{Currency}"

         }),

         new sap.ui.core.Icon({

  src :"sap-icon://slim-arrow-right",

  size:'15px',

  color:'gray'

  })

         ]

  });

It will be helpful if any one can guide me.

Regards, Santosh.

Former Member
Not what you were looking for? View more on this topic or Ask a question