Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dhanasupriya
Active Participant
717
Hello All

These days I am taking lengthy gaps in publishing blogs as I am busy in learning and enjoying motherhood.

Now let's get into on what I am going to discuss in this post.

I have created an SAP UI5 freestyle application in SAP Business Application Studio (SAP BAS) using Smart Filter Bar, Smart Table & List controls and passed Northwind as data source.

Northwind Service: https://services.odata.org/V2/Northwind/Northwind.svc/$metadata

I took this opportunity to let you know that we can also code the controls like sap.m.List within sap.ui.comp Smart Controls, but the interaction cannot happen in between them. Let's get into more details.

view.xml
<mvc:View controllerName="com.zsmart.controller.Main"
xmlns:mvc="sap.ui.core.mvc" displayBlock="true"
xmlns="sap.m" xmlns:smartFilterBar="sap.ui.comp.smartfilterbar" xmlns:smartTable="sap.ui.comp.smarttable">
<Page id="page" >
<content >

<smartFilterBar:SmartFilterBar id="smartFilterBar" persistencyKey="UniqueAndStablePersistencyKey"
entitySet="Orders">
<smartFilterBar:layoutData>
<FlexItemData id="idFlex" shrinkFactor="0"/>
</smartFilterBar:layoutData>
<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration id="CustomerID" key="CustomerID" />
</smartFilterBar:controlConfiguration>
</smartFilterBar:SmartFilterBar>

<smartTable:SmartTable id="smartTable" entitySet="Orders" smartFilterId="smartFilterBar" enableAutoColumnWidth="true"
initiallyVisibleFields="CustomerID,OrderID,Freight,ShipName,ShipCity,OrderDate,RequiredDate,ShippedDate" useVariantManagement="false" useTablePersonalisation="true" header="Order Details" showRowCount="true">
<smartTable:layoutData>
<FlexItemData id="idFlex1" growFactor="1" baseSize="0%"/>
</smartTable:layoutData>
<List id="idList"
items="{/Orders}">
<ObjectListItem id="idObjectList"
title="{CustomerID}"
type="Active"
number="{
parts:[{path:'OrderID'},{path:'Freight'}],
formatOptions: {showMeasure: false}
}"
numberUnit="{EmployeeID}">
<ObjectAttribute id="idObjAtt" text="{ShipName}" />
<ObjectAttribute id="idObjAtt1" text="{ShipCity}" />
</ObjectListItem>
</List>

</smartTable:SmartTable>

</content>
</Page>
</mvc:View>

In the above view code, I have taken Smart Filter Bar, List within SmartTable. When I run the application, I can see the data in both List and SmartTable but when the issue here is I applied the filter in SmartFilterBar and on press of Go button, there is a filtering happened in SmartTable as everyone knows and not in the List (List data remains the same)

I tried this negative approach and got to learn, also let you all know that no such communications can happen in between SAP UI5 controls and Smart Controls.

Output:


 


As we can see in the above output, I gave the filter as " VINET" in CustomerID field. sap.m.List data remains the same and the sap.ui.comp.smarttable.SmartTable got filtered.

I utilize this platform to give a short message that by seeing my son growing, I understood that we can master our goals as we all have learnt to talk, sit, walk and much more since birth which are more difficult than anything.

Thank you!!

BR// Dhanasupriya Sidagam

#EnhanceLearning
1 Comment
Labels in this area