Skip to Content
avatar image
Former Member

Data binding fields from different Data Sets on one control

Hello,

I hope you are well.

Could you please provide some guidance on how to have data binding on fields from two different Data Sets (tables) on one column list item?

For example the “name” and “cs” data fields are in my “HCT_CSSet” data set, while the “price” and “priceInd” data fields are in my “HCT_CSONSet” data set. I want to have the name, cs, price and priceInd fields shown on one column list item, but WebIDE’s data binding seems to only allow one data set per item.

Could you please point me towards any information on how I may have databinding on a few different data fields from a few different datasets on one control/item? Please see screenshots below for clarification.

  • 1. I have two datasets exposed by an Odata service I created, “HCT_CSSet” and “HCT_CSONSet”. Currently this column list correctly displays a list of “name” and corresponding “cs” fields because they are in the bound Data Set “HCT_CSONSet”. But the “Price” and “PriceInd” fields do not display because they are in the “HCT_CSSet” data set.

2. I would like to have all 4 fields display in the same cell/column list item.

3. But the price and priceind fields are in a different data set, “HCT_CSSet”.

4.

5. The Price and priceInd fields do not show when the app is run.

1.png (110.9 kB)
2.png (28.6 kB)
3.png (40.0 kB)
4.png (30.8 kB)
5.png (56.3 kB)
4.png (30.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 10, 2017 at 12:42 PM

    You would need to have a relationship between the two data sets. Odata allows you to call related data sets using the $expand function which UI5 supports as detailed at

    https://openui5beta.hana.ondemand.com/#docs/guide/84100bcfd5b34f62858bdd6f67976b4a.html

    I believe in Web IDE the layout editor only allows you to reference a single data set so you would need to add the expanded fields in the code. If you have no relationship between the data you would have to build this into the odata service.

    Regards,

    Jamie

    SAP - Technology RIG

    Add comment
    10|10000 characters needed characters exceeded