smart filter无法从smart business应用获得值的问题分析

版权声明:本文为博主汪子熙原创文章,未经博主允许不得转载。 https://blog.csdn.net/i042416/article/details/89000939

Reproduce steps:
Logon to UXT/928, add PFCG role “Z_SVA_TEST_ROLE” and “SAP_BR_ANALYTICS_SPECIALIST” to your user in T-Code SU01.
Go to UXT/928 ER9/001 Launchpad, click tile “KPI Workspace”, find KPI tile “Sales Volume Analysis PoC”.
Click Evaluation “Sales Volume Analysis Smart Filter” on the right side, check the input parameters, we have:
P_ExchangeRateType : ‘M’
P_DisplayCurrency : ‘USD’

Go to the corresponding tile of this evaluation:
https://wdciw04.wdf.sap.corp:1300/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=928#FioriApplication-executeAPFConfigurationS4HANA?EvaluationId=.E.1467351258702&sap-apf-configuration-id=14646748206141813511663134550497.14673442047384852617933698117356&/
Click filters on the Smart Filter Bar, you could see there’s no filters added.
Add an analysis step, you could see errors, because P_ExchangeRateType and P_DisplayCurrency are mandatory input parameters for back-end CDS view.
You could go to APF modeler, search app “Sales Volume Analysis Test”, and go to configuratoin “Test Sales Volume Smart Filter 2” to see the settings for Smart Filter.
The corresponding CDS view used for Smart Filter is: Z_SalesVolumeParameter
原来的话,如果用individual filters,那么在Smart Business Tile里面Evaluation里面设置的input parameter和filter的值都是可以传给APF的,APF的filter接收到这些值后将它们作为参数传给CDS来读数据。
但是换了Smart Filter之后好像不行了。

Related tile:

clipboard1

我手动把这个tile配到launchpad上:

clipboard2

然后点tile, 进去发现filter的value 是有值的,自动从你evaluation里指定的value 带过来了:

clipboard3

我把tile配出来,点击进去,url为: https://jerry.sap.corp:1300/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=928#FioriApplication-executeAPFConfigurationS4HANA?EvaluationId=.E.1467351258702&sap-apf-configuration-id=14646748206141813511663134550497.14673442047384852617933698117356&sap-xapp-state=AS54KUQ4D1TKPUK5RGZPKM9V4KDOAQ268UP099DM

你可以在这个文件的这一行设个断点:

clipboard4

断点 停下来之后看看callstack。我之前也没遇到过这个具体的error message.

错误的原因是,这个component.js已经成功download了:

clipboard5

module download之后,总会被立即执行,执行到这行语句时出错:

clipboard6

这是一个时序竞争问题。从红色方框能看出,如果f.pending为true的话,无论f是同步load还是异步load,都会出错。正确的scenario是,sap.apf被load时,f.pending为false, 然后进到蓝色方框的代码里,被改为true, 然后开个promise去下载。

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

猜你喜欢

转载自blog.csdn.net/i042416/article/details/89000939