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

Calculation to be performed through Script logic

Former Member
0 Likes
429

Hello Experts, Need your guidance to achieve below calculation in script logic: For Q1: ACCOUNT1 = (ACCOUNT2* 5%*-1)/4 For Q2: ACCOUNT1=  (ACCOUNT2*5%*-1)/4 +Q1 value etc..... By writing below script, I m facing challenge is  for Quater1 also, it is adding data for previous year last month which is not the requirement. It needs to add data for Q2 as Q2+Q1 , Q3 as Q3+Q2 and Q4 as Q4 as Q4+Q3 and Q1 should equal to Q1. *XDIM_MEMBERSET CAT = BUD *XDIM_MEMBERSET CURR_RPT = SEK *XDIM_MEMBERSET CURR_CODE = BAS(CURR_ALL) *XDIM_MEMBERSET PRC_B = %PRC_B_SET% *XDIM_MEMBERSET ACCOUNT_B = BAS(ACCOUNT2) *XDIM_MEMBERSET TIME = %TIME_SET%*XDIM_MEMBERSET PC_IG_B = BAS(PC_IG_ALL) *XDIM_MEMBERSET AUDIT_FB = BAS(UU3) *WHEN ACCOUNT_B *IS BAS(ACCOUNT2) *REC(FACTOR = -.01/4, ACCOUNT_B = "ACCOUNT1") *ENDWHEN *COMMIT *XDIM_MEMBERSET CAT = BUD *XDIM_MEMBERSET CURR_RPT = SEK *XDIM_MEMBERSET CURR_CODE = BAS(CURR_ALL) *XDIM_MEMBERSET PRC_B = %PRC_B_SET% *XDIM_MEMBERSET PC_IG_B = BAS(PC_IG_ALL) *XDIM_MEMBERSET ACCOUNT_B = ACCOUNT1 *XDIM_MEMBERSET TIME = TMVL(-3,%TIME_SET%),%TIME_SET% *XDIM_MEMBERSET AUDIT_FB = BAS(UU3) *WHEN_REF_DATA = MASTER_DATA *WHEN ACCOUNT_A *IS ACCOUNT1 *REC(FACTOR= 1,TIME_SET = %TIME_SET%) *ENDWHEN *COMMIT Regards, Apoorva

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

Sorry, please post your question in the readable form!!!

former_member186338
Active Contributor
0 Likes

Please also read:

Former Member
0 Likes

Hello Experts, Need your guidance to achieve below calculation in script logic: For Q1: ACCOUNT1 = (ACCOUNT2* 5%*-1)/4 For Q2: ACCOUNT1=  (ACCOUNT2*5%*-1)/4 +Q1 value etc..... By writing below script, I m facing challenge is  for Quater1 also, it is adding data for previous year last month which is not the requirement. It needs to add data for Q2 as Q2+Q1 , Q3 as Q3+Q2 and Q4 as Q4 as Q4+Q3 and Q1 should equal to Q1. *XDIM_MEMBERSET CAT = BUD *XDIM_MEMBERSET CURR_RPT = SEK *XDIM_MEMBERSET CURR_CODE = BAS(CURR_ALL) *XDIM_MEMBERSET PRC_B = %PRC_B_SET% *XDIM_MEMBERSET ACCOUNT_B = BAS(ACCOUNT2) *XDIM_MEMBERSET TIME = %TIME_SET% *XDIM_MEMBERSET PC_IG_B = BAS(PC_IG_ALL) *XDIM_MEMBERSET AUDIT_FB = BAS(UU3) *WHEN ACCOUNT_B *IS BAS(ACCOUNT2) *REC(FACTOR = -.01/4, ACCOUNT_B = "ACCOUNT1") *ENDWHEN *COMMIT *XDIM_MEMBERSET CAT = BUD *XDIM_MEMBERSET CURR_RPT = SEK *XDIM_MEMBERSET CURR_CODE = BAS(CURR_ALL) *XDIM_MEMBERSET PRC_B = %PRC_B_SET% *XDIM_MEMBERSET PC_IG_B = BAS(PC_IG_ALL) *XDIM_MEMBERSET ACCOUNT_B = ACCOUNT1 *XDIM_MEMBERSET TIME = TMVL(-3,%TIME_SET%),%TIME_SET% *XDIM_MEMBERSET AUDIT_FB = BAS(UU3) *WHEN_REF_DATA = MASTER_DATA *WHEN ACCOUNT_A *IS ACCOUNT1 *REC(FACTOR= 1,TIME_SET = %TIME_SET%) *ENDWHEN *COMMIT Regards, Apoorva

Former Member
0 Likes

Sorry , I am writing in correct format but while posting it is getting converted to incorrect one...

My query is to achieve below result from script logic:

For Q1: ACC1 = (ACC2*-5%)/4

For Q2 :ACC2 = (ACC2*-5%)/4+Q1 etc

Regards,

Apoorva

Former Member
0 Likes

Hi Apoorva,

Its just a matter of copying your content in Text or Word format and then copy paste again with correct formatting. Not too much to ask for. Otherwise how can people help you....

Here is your query in readable format:

For Q1: ACCOUNT1 = (ACCOUNT2* 5%*-1)/4

For Q2: ACCOUNT1=  (ACCOUNT2*5%*-1)/4 +Q1 value etc.....

By writing below script, I m facing challenge is  for Quater1 also, it is adding data for previous year last month which is not the requirement. It needs to add data for Q2 as Q2+Q1 , Q3 as Q3+Q2 and Q4 as Q4 as Q4+Q3 and Q1 should equal to Q1.

*XDIM_MEMBERSET CAT = BUD

*XDIM_MEMBERSET CURR_RPT = SEK

*XDIM_MEMBERSET CURR_CODE = BAS(CURR_ALL)

*XDIM_MEMBERSET PRC_B = %PRC_B_SET%

*XDIM_MEMBERSET ACCOUNT_B = BAS(ACCOUNT2)

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET PC_IG_B = BAS(PC_IG_ALL)

*XDIM_MEMBERSET AUDIT_FB = BAS(UU3)

*WHEN ACCOUNT_B

*IS BAS(ACCOUNT2)

*REC(FACTOR = -.01/4, ACCOUNT_B = "ACCOUNT1")

*ENDWHEN

*COMMIT

*XDIM_MEMBERSET CAT = BUD

*XDIM_MEMBERSET CURR_RPT = SEK

*XDIM_MEMBERSET CURR_CODE = BAS(CURR_ALL)

*XDIM_MEMBERSET PRC_B = %PRC_B_SET%

*XDIM_MEMBERSET PC_IG_B = BAS(PC_IG_ALL)

*XDIM_MEMBERSET ACCOUNT_B = ACCOUNT1

*XDIM_MEMBERSET TIME = TMVL(-3,%TIME_SET%),%TIME_SET%

*XDIM_MEMBERSET AUDIT_FB = BAS(UU3)

*WHEN_REF_DATA = MASTER_DATA

*WHEN ACCOUNT_A

*IS ACCOUNT1

*REC(FACTOR= 1,TIME_SET = %TIME_SET%)

*ENDWHEN

*COMMIT

Regards,

JP

Former Member
0 Likes

Are Q1,Q2.....parent members of Time dimension?? 5% will always be fixed?? Please explain the business logic too....What will be %TIME_SET%??? etc.....Explain everything.

Former Member
0 Likes

Hello,

I m sorry for the inconviniece but I had tried the same too.Also I tried from different browsers too. But i was not able to do so. Whilw pasting content, it was getting hanged. I had tried several times.

Again sorry and thank you for converting it to correct format.

Regards,

Apoorva

Former Member
0 Likes

Hello,

Q1, Q2 are Quater1 and Quater2 of time dimension.

5% is fixed.

%TIME_SET% will be any following 4 months of a year: mar, june,sep or dec. on which data will be inputted.

Model is YTD.

BPC COmponents details are:

SAP BPC NW 10.0

SAP_BW with Release level as 730 and SP 11.

CPMBPC with Release level as 800 and SP 12.

The scenario is :

In the model, for example user will input the data for Account2 in period 2016.03, 2016.06, 2016.09 and 2016.12.

Now the requirement is, for Account1  the calculation should be as below:

In Q1: (A2*-5%)/4

In Q2: (A2*-5%)/4 +Q1

InQ3: (A2*-5%)/4 +Q2

In Q4: (A2*-5%)/4 +Q3

Regards,

Apoorva

former_member186338
Active Contributor
0 Likes

Can you explain logic for months? You can't save anything in Quarters.

How do you want to run this script? DM package or default.lgf?