Rec语句中的变量读取不起作用(错误为RUN_LOGIC:关键字中的未知维名称)

2020-08-20 14:42发布

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

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


您好,

我们是BPC 11标准,希望使用如下所示的脚本逻辑进行简单计算,但得到错误" RUN_LOGIC:关键字中的未知维度名称:" 2019:"

脚本:

* SELECT(%NPLC%," [ID]",ACCOUNT," [LOGIC_RULE] ='NONPLCTRL'")

//%NPLC%:此变量将拥有2个帐户,分别为630和640

//%CUR-MTH%:将保留当前季度输入期,在当前情况下为2020.03

* XDIM_MEMBERSET CURRENCY = USD

* XDIM_MEMBERSET CATEGORY = ACTUAL,FORECAST

* XDIM_MEMBERSET ACCOUNT =%NPLC%,400

* XDIM_MEMBERSET DATASRCE =输入

* XDIM_MEMBERSET TIME = BAS(%PREVIOUS_QTR%),%CUR-MTH%

* FOR%NPLSC%=%NPLC%

*类别时

*实际有效

*发生数据丢失时

* IS INPUT

*时间

* IS BAS(%PREVIOUS_QTR%)

* REC(EXPRESSION =((%VALUE%)//[[ACCOUNT]。[400],[CATEGORY]。[ACTUAL],[TIME]。[BAS(%PREVIOUS_QTR%)],[DATASRCE]。[ INPUT])),CATEGORY = FORECAST,TIME =%CUR-MTH%,DATASRCE = CALC)

* ENDWHEN

* ENDWHEN

* ENDWHEN

* ENDWHEN

*下一步

*提交

问题在于读取rec语句中的BAS(%PREVIOUS_QTR%)。

请协助。

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

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


您好,

我们是BPC 11标准,希望使用如下所示的脚本逻辑进行简单计算,但得到错误" RUN_LOGIC:关键字中的未知维度名称:" 2019:"

脚本:

* SELECT(%NPLC%," [ID]",ACCOUNT," [LOGIC_RULE] ='NONPLCTRL'")

//%NPLC%:此变量将拥有2个帐户,分别为630和640

//%CUR-MTH%:将保留当前季度输入期,在当前情况下为2020.03

* XDIM_MEMBERSET CURRENCY = USD

* XDIM_MEMBERSET CATEGORY = ACTUAL,FORECAST

* XDIM_MEMBERSET ACCOUNT =%NPLC%,400

* XDIM_MEMBERSET DATASRCE =输入

* XDIM_MEMBERSET TIME = BAS(%PREVIOUS_QTR%),%CUR-MTH%

* FOR%NPLSC%=%NPLC%

*类别时

*实际有效

*发生数据丢失时

* IS INPUT

*时间

* IS BAS(%PREVIOUS_QTR%)

* REC(EXPRESSION =((%VALUE%)//[[ACCOUNT]。[400],[CATEGORY]。[ACTUAL],[TIME]。[BAS(%PREVIOUS_QTR%)],[DATASRCE]。[ INPUT])),CATEGORY = FORECAST,TIME =%CUR-MTH%,DATASRCE = CALC)

* ENDWHEN

* ENDWHEN

* ENDWHEN

* ENDWHEN

*下一步

*提交

问题在于读取rec语句中的BAS(%PREVIOUS_QTR%)。

请协助。

付费偷看设置
发送
10条回答
槿木_熙
1楼 · 2020-08-20 15:01.采纳回答

脚本:

 * SELECT(%CURRENT_FORE%,[ID],CATEGORY,[IS_CURRENT] = Y)
 * SELECT(%CURRENT_QTR%,[STARTQTR],CATEGORY,[IS_CURRENT] = Y)
 * SELECT(%PREVIOUS_QTR%,[PREVQTR],CATEGORY,[IS_CURRENT] = Y)
 * SELECT(%CUR_QTR_MTH%,[MONTHNUM],TIME,[ID] =%CURRENT_QTR%)
 * SELECT(%CURRENT_YEAR%,[YEAR],TIME,[ID] =%CURRENT_QTR%)
 * XDIM_MEMBERSET TIME =%CURRENT_YEAR%.01//假设月份为01,02 ..
 * SELECT(%CUR-MTH%,[ID],TIME,[MONTHNUM] =%CUR_QTR_MTH%AND [YEAR] =%CURRENT_YEAR%AND [CALC] = N)

 * XDIM_MEMBERSET TIME =%CUR-MTH%//2020.03
 * XDIM_MEMBERSET货币= USD
 * XDIM_MEMBERSET CATEGORY =%CURRENT_FORE%//预测
 * XDIM_MEMBERSET DATASRCE = FT
 * XDIM_MEMBERSET ACCOUNT = 630//%NPLC%

 *当帐户
 *是*
 * REC(EXPRESSION =%VALUE%*([TIME]。[%PREVIOUS_QTR%],[DATASRCE]。[INPUT],[CATEGORY]。[ACTUAL])/(([[ACCOUNT]。[400],[TIME]  。[%PREVIOUS_QTR%],[DATASRCE]。[INPUT],[CATEGORY]。[ACTUAL])+([ACCOUNT]。[401],[TIME]。[%PREVIOUS_QTR%],[DATASRCE]。[INPUT]  ,[CATEGORY]。[ACTUAL])+([ACCOUNT]。[402],[TIME]。[%PREVIOUS_QTR%],[DATASRCE]。[INPUT],[CATEGORY]。[ACTUAL])),DATASRCE = CALC  )
 *结束
 
SKY徐
2楼-- · 2020-08-20 14:54

对不起,但没有提供完整脚本,也没有其他信息:

https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues /

nice_wp
3楼-- · 2020-08-20 15:12

在UJKT中,请运行以下内容并发布 结果(执行):

 * SELECT(%CURRENT_FORE%,[ID],CATEGORY,[IS_CURRENT] = Y)
 * XDIM_MEMBERSET CATEGORY =%CURRENT_FORE%
 * SELECT(%CURRENT_QTR%,[STARTQTR],CATEGORY,[IS_CURRENT] = Y)
 * XDIM_MEMBERSET TIME =%CURRENT_QTR%
 * SELECT(%PREVIOUS_QTR%,[PREVQTR],CATEGORY,[IS_CURRENT] = Y)
 * XDIM_MEMBERSET TIME =%PREVIOUS_QTR%
 * SELECT(%CUR_QTR_MTH%,[MONTHNUM],TIME,[ID] =%CURRENT_QTR%)

 * SELECT(%CURRENT_YEAR%,[YEAR],TIME,[ID] =%CURRENT_QTR%)
 * XDIM_MEMBERSET TIME =%CURRENT_YEAR%.01//假设月份为01,02 ..
 * SELECT(%CUR-MTH%,[ID],TIME,[MONTHNUM] =%CUR_QTR_MTH%AND [YEAR] =%CURRENT_YEAR%AND [CALC] = N)
 * XDIM_MEMBERSET TIME =%CUR-MTH%

我从脚本中删除了很多无用的""

spaceman01
4楼-- · 2020-08-20 15:09

BPC版本:

BPC4HANA 100 0005 SAPK-10005INBPC4HANA BPC/4HANA

引擎:JAVASCRIPT

模型:计划模型

目的用途:使用上一季度的实际数据来计算当前季度的预测数据。

在完整脚本下方:

* SELECT(%CURRENT_FORE%," [ID]",CATEGORY," [IS_CURRENT] ='Y'")

* SELECT(%CURRENT_QTR%," [STARTQTR]",CATEGORY," [IS_CURRENT] ='Y'")

* SELECT(%PREVIOUS_QTR%," [PREVQTR]",CATEGORY," [IS_CURRENT] ='Y'")

* SELECT(%CUR_QTR_MTH%," [MONTHNUM]",TIME," [ID] ='%CURRENT_QTR%'")

* SELECT(%CURRENT_YEAR%," [YEAR]",TIME," [ID] ='%CURRENT_QTR%'")

* SELECT(%CUR-MTH%," [ID]",TIME," [MONTHNUM] ='%CUR_QTR_MTH%'" AND" [YEAR] ='%CURRENT_YEAR%'" AND" [CALC] =' N'")

* SELECT(%NPLC%," [ID]",ACCOUNT," [RULE] ='NRL'")

* XDIM_MEMBERSET CURRENCY = USD

* XDIM_MEMBERSET CATEGORY = ACTUAL,FORECAST

* XDIM_MEMBERSET ACCOUNT =%NPLC%,400

* XDIM_MEMBERSET DATASRCE = INPUT

* XDIM_MEMBERSET TIME AS%LST_QTR%= BAS(%PREVIOUS_QTR%)

* XDIM_ADDMEMBERSET TIME = BAS(%PREVIOUS_QTR%),%CUR-MTH%

* FOR%NPLSC%=%NPLC%

*类别时

*是有效的

*何时发送数据

* IS INPUT

*时间

* IS BAS(%PREVIOUS_QTR%)

* REC(EXPRESSION =((%VALUE%)/([ACCOUNT]。[400],[CATEGORY]。[ACTUAL],[TIME]。[%LST_QTR%],[DATASRCE]。[INPUT]) ),CATEGORY = FORECAST,TIME =%CUR-MTH%,DATASRCE = CALC)

* ENDWHEN

* ENDWHEN

* ENDWHEN

* ENDWHEN

*下一个

* COMMIT


从数据管理器执行,我们传递了CAtegory:FORECAST,但是无论如何,脚本都是通过Category维度的主数据控制的。

我们遇到的错误:RUN_LOGIC:关键字中的未知维度名称:" 2019:


UJKT错误:UJK_VALIDATION_EXCEPTION:关键字中的未知尺寸名称:" 2019:



葫芦娃快救爷爷
5楼-- · 2020-08-20 14:53

发现错误:

 * XDIM_MEMBERSET TIME AS%LST_QTR%= BAS(%PREVIOUS_QTR%)
//%LST_QTR%= 2019.10,2019.11,2019.12
//绝对不正确,无法在REC中使用多个成员
 * REC(EXPRESSION =((%VALUE%)//[[ACCOUNT]。[400],[CATEGORY]。[ACTUAL],[TIME]。[%LST_QTR%],[DATASRCE]。[INPUT])),类别 = FORECAST,TIME =%CUR-MTH%,DATASRCE = CALC)
//[TIME]。[%LST_QTR%]-错误!

 
追夢秋陽
6楼-- · 2020-08-20 14:56
Nilesh Jain

通常,该方法必须是:首先是详细的业务逻辑,然后是脚本 !

代楠1984
7楼-- · 2020-08-20 14:59

这是我们正在努力实现的目标。 仅供参考,400和401只是父母40的基本成员,而402是单独的成员。

一周热门 更多>