/scripts/ahub.form.attachments.js
0

*REC command does ruslt zero

Feb 02, 2017 at 02:05 PM

61

avatar image

The follwoing sricpt logic result is zero value and the debugger isn't show error message.

Value:
Account_1 = 2, account_2 = 3

*WHEN ACCOUNT

*IS "ACCOUNT_1"

*REC(FACTOR=[ACCOUNT].[ACOUNT_2],ACCOUNT="ACCOUNT_3")

I fount a similiar sap note (2210695), which suggest to check the database server collection, and database collection, but these were right SQL_Latin1_General_CP1_CI_AS.
Anybody has other resulotion tipp?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Ibai Madariaga Feb 08, 2017 at 10:25 AM
1

Did you check that the values for account_1 and account_2 are in the same intersections for every other dimension in the model?

In the example below:

Time,Entity,Category,Account,Value
2017.JAN,E1,BUDGET,ACCOUNT_1,2
2017.JAN,E2,BUDGET,ACCOUNT_2,3

The result would be 0 fro Account_3 unless both accounts were in the same entity

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Also, please note that you are using SAP BPC NW syntax. In MS you should use GET function instead (which needs to be in scope)

*WHEN ACCOUNT

*IS "ACCOUNT_1"

*REC(FACTOR=GET(ACCOUNT="ACCOUNT_2"),ACCOUNT="ACCOUNT_3")

*ENDWHEN

1

Thank! The Get statement work

0
Priyanka Jagtap Feb 08, 2017 at 10:40 AM
0

Hi Nobert,

your script logic is wrong....In FACTOR always a numeric value is considered in script logic....Like FACTOR = 1.

Your script would be...

*WHEN ACCOUNT

*IS "ACCOUNT_1"

*REC(EXPRESSION=%VALUE%*[ACCOUNT].[ACCOUNT_2],ACCOUNT="ACCOUNT_3")

*ENDWHEN

Go through this document for basic syntax. http://www.sap.com/documents/2015/08/6cdcaf53-557c-0010-82c7-eda71af511fa.html

Though its for NW mostly but most of the syntaxes work in MS too!

Regards,

JP

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content