APF filter到底支持多复杂的条件
When I added 6 individual filters in the configuration:
And run it:
Add first step is OK, but when select Year 2016 and add second step, dump occurred:
The error is “Filter condition is too complex”
The batch request URL is as below:
https://jerry:1300/sap/opu/odata/sap/Z_SALESVOLUMEANALYSISQUERY_CDS/Z_SALESVOLUMEANALYSISQUERY(P_ExchangeRateType=%27M%27,P_DisplayCurrency=%27EUR%27)/Results?KaTeX parse error: Expected 'EOF', got '&' at position 76: …DisplayCurrency&̲filter=((((BillingDocumentDateYear%20eq%20%272015%27)%20or%20(BillingDocumentDateYear%20eq%20%272016%27)%20or%20(BillingDocumentDateYear%20eq%20%272017%27))%20and%20((BillingDocDateYearQuarter%20eq%20%271.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%272.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%271.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%272.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2017%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2017%27))%20and%20((BillingDocDateYearMonth%20eq%20%2702.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2705.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2706.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2707.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2708.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2709.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2710.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2711.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2712.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2701.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2702.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2703.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2704.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2705.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2706.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2709.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2711.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2708.2017%27)%20or%20(BillingDocDateYearMonth%20eq%20%2710.2017%27)))%20and%20((SalesOrganization%20eq%20%270001%27)%20or%20(SalesOrganization%20eq%20%270012%27)%20or%20(SalesOrganization%20eq%20%27ZBG1%27)%20or%20(SalesOrganization%20eq%20%27ZZZ1%27))%20and%20(BillingDocumentDateYear%20eq%20%272015%27))&$format=json
Seems indeed it’s very complex… but all the filters are necessary, looks like I have to try Smart Filter instead…
I’ve copied the configuration, you could use the copied one:
我找到了具体引起这个错误的ABAP code,一会给你说怎么定位:
现在在看怎么避免这个error。你第一次添加step时能够正常工作,因为it_filter_select_options和iv_filter_string都是有值的:
而添加第二个step时,it_filter_select_options不知为何为空了,所以框架检查出错:
还需要继续看。第一个step传到后台的url:
GET Z_SALESVOLUMEANALYSISQUERY(P_ExchangeRateType=%27M%27,P_DisplayCurrency=%27EUR%27)/Results?KaTeX parse error: Expected 'EOF', got '&' at position 74: …DisplayCurrency&̲filter=((((BillingDocumentDateYear%20eq%20%272015%27)%20or%20(BillingDocumentDateYear%20eq%20%272016%27)%20or%20(BillingDocumentDateYear%20eq%20%272017%27))%20and%20((BillingDocDateYearQuarter%20eq%20%271.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%272.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%271.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%272.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2017%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2017%27))%20and%20((BillingDocDateYearMonth%20eq%20%2702.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2705.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2706.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2707.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2708.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2709.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2710.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2711.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2712.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2701.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2702.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2703.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2704.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2705.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2706.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2709.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2711.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2708.2017%27)%20or%20(BillingDocDateYearMonth%20eq%20%2710.2017%27)))%20and%20((SalesOrganization%20eq%20%270001%27)%20or%20(SalesOrganization%20eq%20%270012%27)%20or%20(SalesOrganization%20eq%20%27ZBG1%27)%20or%20(SalesOrganization%20eq%20%27ZZZ1%27)))&format=jsonHTTP/1.1第二个step的url:GETZSALESVOLUMEANALYSISQUERY(PExchangeRateType=format=json HTTP/1.1 第二个step的url: GET Z_SALESVOLUMEANALYSISQUERY(P_ExchangeRateType=%27M%27,P_DisplayCurrency=%27EUR%27)/Results?format=jsonHTTP/1.1第二个step的url:GETZSALESVOLUMEANALYSISQUERY(PExchangeRateType=select=BillingDocDateYearQuarter,DisplayCurrency,NetAmountInDisplayCurrency&filter=((((BillingDocumentDateYearfilter=((((BillingDocumentDateYear%20eq%20%272015%27)%20or%20(BillingDocumentDateYear%20eq%20%272016%27)%20or%20(BillingDocumentDateYear%20eq%20%272017%27))%20and%20((BillingDocDateYearQuarter%20eq%20%271.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%272.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2015%27)%20or%20(BillingDocDateYearQuarter%20eq%20%271.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%272.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2016%27)%20or%20(BillingDocDateYearQuarter%20eq%20%273.2017%27)%20or%20(BillingDocDateYearQuarter%20eq%20%274.2017%27))%20and%20((BillingDocDateYearMonth%20eq%20%2702.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2705.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2706.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2707.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2708.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2709.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2710.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2711.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2712.2015%27)%20or%20(BillingDocDateYearMonth%20eq%20%2701.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2702.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2703.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2704.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2705.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2706.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2709.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2711.2016%27)%20or%20(BillingDocDateYearMonth%20eq%20%2708.2017%27)%20or%20(BillingDocDateYearMonth%20eq%20%2710.2017%27)))%20and%20((SalesOrganization%20eq%20%270001%27)%20or%20(SalesOrganization%20eq%20%270012%27)%20or%20(SalesOrganization%20eq%20%27ZBG1%27)%20or%20(SalesOrganization%20eq%20%27ZZZ1%27))%20and%20(BillingDocumentDateYear%20eq%20%272016%27))&filter=((((BillingDocumentDateYearformat=json HTTP/1.1在第二个step时,上面的方法解析select option出错了:因此最后没有select option传到后台框架去,所以引起了那个错误。
解析出错的原因
这个BILLINGDOCUMENTDATEYEAR出现在了一个内表里,expect的行为是不出现。还需要看。
比较两个step发送url有何差异,已经能看出原因了,蓝色的区域是第二个step新增加的url:
之前的研究概括起来就是:在第一个step的chart上选中2016年那个节点,然后创建第二个step,此时给后台发送的url如下:
这时选中的context 2016年就是上图紫色的内容,通过debug框架,发现其验证逻辑认为紫色的2016年是不合法的,因为and 左边的filter里已经包含了这个条件了,所以报错。这些url都是APF runtime 负责拼接再传给后台的,我们没办法控制,这个问题可能需要和APF的同事一起来看:
或者是我们filter的modelling有问题
或者是APF 处理filter这块的JS代码有问题
We got this “filter condition is too complex error” again, add sap-apf-filter-reduction=true in the URL doesn’t work this time.
Go to:
https://jerry:1300/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=928#BillingDocument-testSalesVolume?EvaluationId=.E.1464769533103&sap-xapp-state=ASMUJD92Q3C7JZ6BJ9G5AA8DNIVBC7IKQFPAM4WD&/
Don’t change filter, add a step, the error will occur.
I checked the error log and debugged the code like we did last time, I found that the cause is not the same as the last time:
Filter check code on ER9:
It seems the code check if there’re more than one filters have more than one values in the condition, if so, it will raise error.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
APF filter到底支持多复杂的条件相关推荐
- ASP.NET Core Filter如何支持依赖注入
概述 通过使用 ASP.NET Core 中的筛选器,可在请求处理管道中的特定阶段之前或之后运行代码.内置筛选器处理任务,例如:授权(防止用户访问未获授权的资源).响应缓存(对请求管道进行短路出路,以 ...
- 32位计算机内存最大多少,32位系统到底支持多大的内存呢
在我们的日常生活中很多朋友都知道自己的电脑是安装了64位还是32位的系统,但是有的朋友电脑内存是8G安装了32位的系统,发现没有全部使用到8G,甚至使用内存还不够4G,到底是怎么回事呢?32位系统到底 ...
- 支持城市及查询条件 车行易车辆违章查询sdk代码示例
车行易车辆违章查询sdk可以查询支持城市及查询条件,并且查询违章,违章列表.违章时间.违章地点.违章行为.违章代码.违章扣分.违章罚款等等. 注意:目前大部分省份的交警系统数据已全省联网,指定一个省份 ...
- nvme协议 sata接口_SATA通道的M.2接口 到底支持Nvme固态硬盘吗?
随着大众对固态硬盘了解的深入,越来越多的电脑开始预装固态硬盘.不过商人逐利,为了节省成本,很多品牌机预装的都是比较初级的SATA固态硬盘.它们到底是不支持NVMe固态硬盘,还是支持却不敢说出来呢? 标 ...
- GContracts1.1.0支持前置/后置条件的继承
2019独角兽企业重金招聘Python工程师标准>>> GContracts 1.1.0已于端午节前(6月14日)发布了.Andre Steingress 在其博文中,讲述了该版本中 ...
- 【转载】同步和互斥的POSIX支持(互斥锁,条件变量,自旋锁)
上篇文章也蛮好,线程同步之条件变量与互斥锁的结合: http://www.cnblogs.com/charlesblc/p/6143397.html 现在有这篇文章: http://blog.csd ...
- 澄清 | snappy压缩到底支持不支持split? 为啥?
前两天,群里小伙伴问了一个问题: 不是说snappy压缩不支持split嘛,为什么我改小mapred.max.split.size一倍之后,mapper数翻倍? 一直以来大家都知道snappy是不支持 ...
- 同步和互斥的POSXI支持(互斥锁,条件变量,自旋锁)
同步和互斥在多线程和多进程编程中是一个基本的需求,互相协作的多个进程和线程往往需要某种方式的同步和互斥.POSIX定义了一系列同步对象用于同步和互斥. 同步对象是内存中的变量属于进程中的资源,可以按照 ...
- 四川省“天府益企计划·高层次人才成果转化及创业支持行动”申报范围条件及申请奖补材料
四川省"天府益企计划·高层次人才成果转化及创业支持行动"申报范围 通过省级中小企业发展专项资金支持高层次人才创办的企业或成果转化所在的企业,用于奖励高层次人才和促进企业健康发展.其 ...
最新文章
- Python OpenCV学习笔记之:图像读取,显示及保存
- pstree进程管理
- N-gram统计语言模型(总结)
- qtextedit 默认文案_QT中常用的控件说明.md
- .NET 指南:参数的设计
- jdk11 默认收集器_JDK 11:新的默认收集方法toArray(IntFunction)
- Java包装类中的equals方法
- android 实现自定义卫星菜单
- contes 7.6安装后网络问题解决方案
- ES6新特性_ES6模板字符串---JavaScript_ECMAScript_ES6-ES11新特性工作笔记007
- JAVA中如何创建一个二维数组,然后给二维数组赋值!
- 国外卫星地图mapbox的基本操作
- quartus ii
- 如何对销售额进行预测?
- 隐藏在发表的宏基因组文章背后故事,如何发掘和学习
- ORA-01439: 要更改数据类型, 则要修改的列必须为空
- 二叉树剪枝_二叉树遍历与剪枝
- 【转】校园招聘 建议
- 软件版本alpha、Beta、RC、GA、DMR等含义
- opencv读取图像的灰度值并显示出来
热门文章
- Linux之部署虚拟环境、安装系统
- 校招小白机考入坑之从键盘输入java的各种数据类型
- Yii 中Criteria常用方法
- ionic 添加地图定位功能
- ASP.Net Telerik RadGrid动态生成表头
- surefire单元测试 并发 提速
- python与正则表达式(part1)--元字符
- 华南理工专科计算机随堂联系,华南理工大学网络教育计算机基础随堂练习第三章...
- 二级 计算机 vf,计算机二级(VF)笔试-144.doc
- Python基础语法:数据类型、进制转换、转义字符、字符编码、整数与浮点数运算规则、布尔型运算规则