cancel
Showing results for 
Search instead for 
Did you mean: 

*REC command does ruslt zero

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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

Former Member

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

Former Member
0 Kudos

Thank! The Get statement work

Answers (1)

Answers (1)

Former Member
0 Kudos

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