在SAPUI5中搜索子级

2020-08-15 20:42发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)嗨,技术专家 我在XML视图中...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


嗨,技术专家

我在XML视图中有一个嵌套表。 我有一个搜索栏,需要搜索UI5中的子元素。 我的Json结构如下所示,

" headerList":[{" Material":" 0950418867"," Plant":" 1C03"," MaterialType":" 1045"," Procurement":" E"," itemsList":[{ :" 87566340","描述":" Mat1","数量":" 10","产品":" true","成本":" X"," SortString":" 1"},{" Component" :" 875663401","描述":" Mat2","数量":" 10","产品":" true","成本":" X"," SortString":" 1"},{" Component" :" 875663402"," Description":" Mat3"," Quantity":" 10"," Prod":" true"," Cost":" X"," SortString":" 1"}]}

我使用"过滤器"操作搜索诸如

的材料
" headerList":[{" Material":" 0950418867"," Plant":" 1C03"," MaterialType":" 1045"," Procurement":" E"," itemsList":[{  :" 87566340","描述":" Mat1","数量":" 10","产品":" true","成本":" X"," SortString":" 1"},{" Component"  :" 875663401","描述":" Mat2","数量":" 10","产品":" true","成本":" X"," SortString":" 1"},{" Component"  :" 875663402"," Description":" Mat3"," Quantity":" 10"," Prod":" true"," Cost":" X"," SortString":" 1"}]}



 返回新的过滤器({
 过滤器:[
 新的Filter(" Material",FilterOperator.Contains,sQuery),//正在运行

 new Filter(" headerList/itemsList/Component",FilterOperator.Contains,sQuery)//不起作用。
 ],
 和:false
 });


 当我尝试搜索上面不起作用的Child元素时。 您能建议正确的方法吗? 预先感谢。
6条回答
callcenter油条
2020-08-15 21:01

嗨,摩尔,

下面的过滤器逻辑应该正常工作。

新的Filter(" Component",FilterOperator.Contains,sQuery)

我认为您需要 提供有关应用程序设计的更多详细信息(视图,控制器,输出),以更好地了解应用程序的设计。

此致

Rama

一周热门 更多>