Skip to Content
0

SAP BPC Script logic issue

Jan 09 at 07:35 PM

45

avatar image
Former Member

Hello All, I am trying to sum couple of accounts and add to existing value in different account & intersection for ex:

A=100, B=50,C=100 D=500 expected result in D = 750 ( Datasource, Account, Reporting line are different)

But after executing following script I am getting 750+500 = 1250 in Account D. It looks like it is not overwriting the new value(750) in destination.

*XDIM_MEMBERSET ACCOUNT=A,B,C
*XDIM_MEMBERSET DATASOURCE=INPUT
*XDIM_MEMBERSET REPORTINLINE=R1
*WHEN REPORTINGLINE
*IS R1
*REC(EXPRESSION=%VALUE% + ([REPORTINGLINE].[R2],[DATASOURCE].[ADJUST],[ACCOUNT].[D]),ACCOUNT=D,DATASOURCE=ADJUST,REPORTINGLINE=R2)
*ENDWHEN
10 |10000 characters needed characters left characters exceeded
0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Vadim Kalinin Jan 09 at 09:23 PM
0

You can use the following script:

//Scope everything
*XDIM_MEMBERSET DATASOURCE=INPUT,ADJUST
*XDIM_MEMBERSET REPORTINLINE=R1,R2
*XDIM_MEMBERSET ACCOUNT=A,B,C,D

*WHEN DATASOURCE
*IS INPUT
  *WHEN REPORTINLINE
  *IS R1
    *WHEN ACCOUNT
    *IS A,B,C
      *REC(EXPRESSION=%VALUE%,ACCOUNT=D,DATASOURCE=ADJUST,REPORTINGLINE=R2)
    *ENDWHEN
  *ENDWHEN
*IS ADJUST
  *WHEN REPORTINLINE
  *IS R2
    *WHEN ACCOUNT
    *IS D
      *REC(EXPRESSION=%VALUE%,ACCOUNT=D,DATASOURCE=ADJUST,REPORTINGLINE=R2)
    *ENDWHEN
  *ENDWHEN
*ENDWHEN

This script will read input data and aggregate it in D, ADJUST, R2

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Jan 09 at 08:24 PM
0

Please show the existing data with all dimensions provided. Not only Account!

"Datasource, Account, Reporting line are different" - explain this statement.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 09 at 09:01 PM
0

Hello Vadim, Here is the sample data.

Account DATSOURCE REPORTINGLINE 
A       INPUT     R1        100
B       INPUT     R1	     50
C       INPUT     R1        100
D       ADJUST    R2        500

Expected result:
Account DATSOURCE REPORTINGLINE
D       ADJUST    R2        750
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 09 at 11:07 PM
0

Thanks Very much Vadim. I got the expected result.

Share
10 |10000 characters needed characters left characters exceeded