cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC Script logic issue

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Very much Vadim. I got the expected result.

Former Member
0 Kudos

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
former_member186338
Active Contributor
0 Kudos

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

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