cancel
Showing results for 
Search instead for 
Did you mean: 

Perform Dynamic Calculation using Script logic on base members only

Former Member
0 Kudos

Hi All,

Hope you are all doing well. I am having an in in script logic and please help me in resolving this issue.. thanks

Version BPC Netweaver Version 10 ; Release 801 ; SP level : 0008 ;

Requirement :

In Report : Rows : Account ; Column : CostCenter

          A,       B,      C,     D,     E,     F,      G, 

A1   -  1,         2,      3,      4,      5,     6,     21,      

                   

I need to derive a figure by summing 6 costcenters (For eg - A,B,C,D,E,F) based on 1 Account (For eg -  A1) and put the sum value  of all the 6 costcenters into a costcenter (G) for that Account (A1).

To achieve this I wrote script logic but it is fetching 0 records when testing in UJKT, please review and also suggest any alternative methods in achieving this.

Scoping : Working fine in UJKT,

*WHEN ACCOUNT

*IS A1

*WHEN COSTCENTER

*IS "H"

*REC(EXPRESSION=[COSTCENTER].[A]+[COSTCENTER].[B]+[COSTCENTER].[C]+[COSTCENTER].[D]+[COSTCENTER].[E]+[COSTCENTER].[F],COSTCENTER=G)

*ENDWHEN  

*ENDWHEN

*COMMIT



Please let me know if you need any further information.


Thanking you in anticipation.

Vishal



Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

Hi Vishal,

If you are writing the script for DM package then:

*XDIM_MEMBERSET ACCOUNT=A1

*XDIM_MEMBERSET COSTCENTER=A,B,C,D,E,F

*WHEN ACCOUNT

*IS *

*REC(EXPRESSION=%VALUE%,COSTCENTER=G)

*ENDWHEN

Vadim

P.S. If you are writing script for default.lgf - it will be different!

former_member228522
Active Participant
0 Kudos

Hi Vishal,

Why you have used Costcenter IS "H" in WHEN condition while this is not required in your requirement?

Best Regards,

Deepak