cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP BPC Script Logic Merge Data

0 Likes
650

Hi Expert,

I'm trying to use a Property to help with calculation in script logic and looking for help with the scripts. Here is the required calculation: In the Account Dimension, I need to merge data in the LCxxx members to those in the Matching GLxxx. For example, LC001 has $100, after merge calculation, matching GL201 should have 100 + 10 =110; likewise, GL133 should have 200 + 300 + 20 = 520.

The following scripts would work to calculate properly.

*WHEN ACCOUNT

*IS LC001, GL201

*REC(EXPRESSION=(%VALUE%),ACCOUNT = GL201)

*IS LC002, LC003, GL133

*REC(EXPRESSION=(%VALUE%),ACCOUNT = GL133)

*ENDWHEN

However, I have more than 200 LC accounts to merge so I'm trying to setup a Property to identify the Matching GL. The following script will replace, but not merge the data. Any suggestion?

*SELECT(%DELC%,"[ID]",ACCOUNT,"[DELETE]='Y')

*XDIM_MEMBERSET ACCOUNT=%DELC%

*WHEN ACCOUNT

*IS *

*REC(EXPRESSION=(%VALUE%),ACCOUNT = ACCOUNT.MATCH_GL)

*ENDWHEN

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

You have to enter this property for GLxxx accounts also:

For GL201 MATCH_GL=GL201

And scope both GL and LC accounts!

P.S. But merging data with existing data is a bad idea in general - you will be able to run this script only once!

Answers (1)

Answers (1)

0 Likes

Thanks Vadim! Simple and brilliant. Works like a charm ...

Your comment on the calculation is absolutely correct. This merging data is a one-off special request to remove certain account memberID from the chart of accounts. So need to merge data ensure total is not changed.

Thanks again!