<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Binding expanded entityset result to smart table in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/binding-expanded-entityset-result-to-smart-table/qaa-p/12309452#M4613197</link>
    <description>&lt;P&gt;Did you get a solution to this?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2024 07:51:46 GMT</pubDate>
    <dc:creator>GeethaRanjani</dc:creator>
    <dc:date>2024-01-05T07:51:46Z</dc:date>
    <item>
      <title>Binding expanded entityset result to smart table</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-expanded-entityset-result-to-smart-table/qaq-p/12309451</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am trying to bind an expanded entity set result to a smart table. Followed the below steps.&lt;/P&gt;
  &lt;P&gt;I tried giving the navigation property name in tableBindingPath property (as mentioned at &lt;A href="https://stackoverflow.com/questions/31996305/bind-smarttable-with-entityset-of-an-entity"&gt;link&lt;/A&gt;). But that's not working. So I defined custom columns(as mentioned at &lt;A href="https://answers.sap.com/questions/193919/display-columns-of-exapnded-entity-in-smart-table.html"&gt;here &lt;/A&gt;and &lt;A href="https://stackoverflow.com/questions/43806950/sapui5-smart-table-expand"&gt;here&lt;/A&gt;) and tried binding the navigation property fields names. Also in beforeRebindTable I have mentioned the expand parameter as below &lt;/P&gt;
  &lt;P&gt;mBindingParams.parameters["expand"] = "HeaderToItemNav"; &lt;/P&gt;
  &lt;P&gt;The second approach works and expanded entity call happens and pulls the data. But only the header set data is binding and not the dependent entity set details. &lt;/P&gt;
  &lt;P&gt;Please throw some light on how to achieve this.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;smartFilterBar:SmartFilterBar id="smartFilterBar" entitySet="HeaderSet"&amp;gt;
                            &amp;lt;smartFilterBar:controlConfiguration&amp;gt;
                                &amp;lt;smartFilterBar:ControlConfiguration key="Id" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false"&amp;gt;
                                &amp;lt;/smartFilterBar:ControlConfiguration&amp;gt;
                            &amp;lt;/smartFilterBar:controlConfiguration&amp;gt;
                        &amp;lt;/smartFilterBar:SmartFilterBar&amp;gt;

                        &amp;lt;smartTable:SmartTable id="smartIdid" 
                                               entitySet="HeaderSet" 
                                               tableType="ResponsiveTable" 
                                               useExportToExcel="true" 
                                               useTablePersonalisation="true" 
                                               showRowCount="true" 
                                               showFullScreenButton="false" 
                                               enableAutoBinding="true" 
                                               showVariantManagement="true" 
                                               width="100%" header="Stocks" 
                                               beforeRebindTable="onBeforeRebind"&amp;gt;
                            &amp;lt;Table id="dataTable"&amp;gt;
                                &amp;lt;columns&amp;gt;
                                    &amp;lt;Column&amp;gt;
                                        &amp;lt;customData&amp;gt;
                                            &amp;lt;core:CustomData key="p13nData" 
                                                             value='{"columnKey": "Sdept","leadingProperty": "HeaderToItemNav/Sdept"}'/&amp;gt;
                                        &amp;lt;/customData&amp;gt;
                                        &amp;lt;Text text="Department"/&amp;gt;
                                    &amp;lt;/Column&amp;gt;
                                    &amp;lt;Column&amp;gt;
                                        &amp;lt;customData&amp;gt;
                                            &amp;lt;core:CustomData key="p13nData" 
                                                             value='{"columnKey": "Stock","leadingProperty": "HeaderToItemNav/Stock"}'/&amp;gt;
                                        &amp;lt;/customData&amp;gt;
                                        &amp;lt;Text text="Stock"/&amp;gt;
                                    &amp;lt;/Column&amp;gt;
                                &amp;lt;/columns&amp;gt;
                                &amp;lt;items&amp;gt;
                                    &amp;lt;ColumnListItem&amp;gt;
                                        &amp;lt;cells &amp;gt;
                                            &amp;lt;Text text="{HeaderToItemNav/Sdept}"/&amp;gt;
                                        &amp;lt;/cells&amp;gt;
                                        &amp;lt;cells &amp;gt;
                                            &amp;lt;Text text="{HeaderToItemNav/Stock}"/&amp;gt;
                                        &amp;lt;/cells&amp;gt;
                                    &amp;lt;/ColumnListItem&amp;gt;
                                &amp;lt;/items&amp;gt;
                            &amp;lt;/Table&amp;gt;
                        &amp;lt;/smartTable:SmartTable&amp;gt;

Controller:

            onBeforeRebind: function (oEvent) {
                var mBindingParams = oEvent.getParameter("bindingParams");
                mBindingParams.parameters["expand"] = "HeaderToItemNav";
            },

&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1873965-result-set.txt"&gt;result-set.txt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 08:35:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-expanded-entityset-result-to-smart-table/qaq-p/12309451</guid>
      <dc:creator>Kishoregokara</dc:creator>
      <dc:date>2021-01-07T08:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Binding expanded entityset result to smart table</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-expanded-entityset-result-to-smart-table/qaa-p/12309452#M4613197</link>
      <description>&lt;P&gt;Did you get a solution to this?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 07:51:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-expanded-entityset-result-to-smart-table/qaa-p/12309452#M4613197</guid>
      <dc:creator>GeethaRanjani</dc:creator>
      <dc:date>2024-01-05T07:51:46Z</dc:date>
    </item>
  </channel>
</rss>

