在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条回答
me_for_i
2020-08-15 20:56

嗨Ramakrishnappa Gangappa,

我的XML喜欢附加的屏幕截图,喜欢嵌套表。 当我尝试搜索材料时,

TIA。

 new Filter(" Material",FilterOperator.Contains,sQuery);

 但是,当尝试像下面那样搜索嵌套表内容时,它将无法正常工作。
 新的Filter(" headerList/itemsList/Component",FilterOperator.Contains,sQuery);

 我不确定如何过滤商品详细信息。  TIA。



 

一周热门 更多>