Skip to Content

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

Binding included properties by odata service with $expand parameter


I'm trying to bind some properties with a template on a grid using the code below :

  1. // Template of the grid's cells
  2.   var gridTemplate = new easybag.util.MaterialCell({
  3.        reference : "{MaterialNum}",
  4.        wholeSalesPrice : "{NavPricing/WholeSalesPrice}",
  5.        retailPrice : "{NavPricing/RetailPrice}",
  6.        currency : "{NavPricing/Currency}",
  7.   });
  8.   // Binding
  9.   grid.setModel(modelMaterials);
  10.   grid.bindAggregation("content", {
  11.        path: "/Materials",
  12.        template: gridTemplate,
  13.        filters: filters,
  14.        parameters: {expand: "NavMatnr/NavPricing"}
  15.   });

I attached to the post a file containing a sample of xml returned by the service call.

All I want to do is to access to the properties WholeSalesPrice, RetailPrice of the NavPricing child.

I tried different things but nothing worked, I can only read the Materials properties (MaterialNum, MaterialDesc, ...).

Thanks for you help,


tmp.xml (6141 B)
Former Member
Not what you were looking for? View more on this topic or Ask a question