cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10 MS: script logic calculates zeros for REC statements

Former Member
0 Kudos

We did a migration from a BPC MS 7.5 to a BPC MS 10 according to the migration guide. The functionality of running a script logic via a data manager package did work before and was used a lot. After the migration of the system the same procedure of calling up a script logic with a data manager package was used but gave different results. The log showed that all data was set to zero and this was written back to the database. There was data in the source record but the system just made it zero and wrote that back to the database. An example of the script logic:

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

*XDIM_MEMBERSET BRON=A9

*XDIM_MEMBERSET GROEP=PG_TOT

*WHEN ENTITEIT.PG_PI

*IS "Y"

*REC(FACTOR=1,GROEP="PG_PI",BRON="A99")

*ENDWHEN

*COMMIT


The log file show that only zeros are written back to the database:

Model: FINANCIEEL - Records to be posted are 97  (calc diff = 0)

PERIODE,VERSIE,BRON,ENTITEIT,GROEP,INTCO,KOSTENDRAGER,KOSTENPLAATS,REKENING,SPECIFICATIE,VERLOOP,SIGNEDDATA

  1. 2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L136500,SP999,F_ARES,0
  2. 2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L136500,SP999,F_CLO,0
  3. 2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L145000,SP999,F_ARES,0

However, if we run the same logic using the logic debugger in the BPC administration client with options ‘run logic and save result’ and ‘calc diff=0’ then the logic script works as it should be. When we look at the log of this file it calculates the value correctly:

Model: FINANCIEEL - Records to be posted are 97  (calc diff = 0)


PERIODE,VERSIE,BRON,ENTITEIT,GROEP,INTCO,KOSTENDRAGER,KOSTENPLAATS,REKENING,SPECIFICATIE,VERLOOP,SIGNEDDATA

  1. 2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L136500,SP999,F_ARES,45179.7400000000
  2. 2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L136500,SP999,F_CLO,45179.7400000000
  3. 2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L145000,SP999,F_ARES,-45179.7400000000

No Sap note could be found on this issue.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jens,

When we made the switch from BPC 7 to BPC 10, some of our scripts needed to have this code at the top of them to work.  We would see the correct calculations in the log but it was not writing the data.

 

*CALCULATE_DIFFERENCE=1

Maybe try adding this after you call in your dimensions and see if this works? 

-Tracey

Former Member
0 Kudos

Hi,

according to the original post you should have

CALCULATE_DIFFERENCE=0 in your script as that is what you use in the debugger.

BR,

Arnold

Former Member
0 Kudos

At first the *CALCULATE_DIFFERENCE=1 worked, and gave hopefull signs:


Time to calculate difference: 0.01 sec.

Time to prepare final strings: 0.01 sec.

Total processing time: 2.02 sec.

Model: FINANCIEEL - Records to be posted are 97  (calc diff = 1)

PERIODE,VERSIE,BRON,ENTITEIT,GROEP,INTCO,KOSTENDRAGER,KOSTENPLAATS,REKENING,SPECIFICATIE,VERLOOP,SIGNEDDATA

2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L136500,SP999,F_ARES,-45179.7400000000

2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L136500,SP999,F_CLO,-45179.7400000000

2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L145000,SP999,F_ARES,45179.7400000000

2014.JAN,ACTUAL,A99,FI001,PG_PI,IC040,KD999,KP999999,L145000,SP999,F_OPE,-45179.7400000000

...

Time to validate records: 0.00 sec.

Post Record Status

Save count : 97

Accept count : 97

Reject count : 0

Locked region(s) by work status: 0

Posting is OK

Time to post records: 2.24 sec.

But after clearing on A99 and trying the package again it didn't even post a record:


Time to calculate difference: 0.01 sec.

Time to prepare final strings: 0.01 sec.

Total processing time: 1.99 sec.

Model: FINANCIEEL - Records to be posted are 0  (calc diff = 1)

PERIODE,VERSIE,BRON,ENTITEIT,GROEP,INTCO,KOSTENDRAGER,KOSTENPLAATS,REKENING,SPECIFICATIE,VERLOOP,SIGNEDDATA

Time to post records: 0.00 sec.

I can't seem to recreate the first hopeful package run although my statement in the script logic stayed exactly the same:

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

*XDIM_MEMBERSET BRON=A9

*XDIM_MEMBERSET GROEP=PG_TOT

*CALCULATE_DIFFERENCE=1

*WHEN ENTITEIT.PG_PI

*IS "Y"

*REC(FACTOR=1,GROEP="PG_PI",BRON="A99")

*ENDWHEN

*COMMIT

Any ideas?

Former Member
0 Kudos

CALCULATE_DIFFERENCE=0 does not do the trick as this is the default setting if CALCULATE_DIFFERENCE is not specified, but thanks!

Former Member
0 Kudos

Hi Jens, are you changing the data the script runs on and then re-running?  The *CALCULATE_DIFFERENCE=1 will know if you didn't change a data value and will not re-write unless it has to.....can you change data and try again or is that what you tested? Thanks, Tracey

Former Member
0 Kudos

Hi Tracy,

That is indeed what I tested. I cleared destination BRON: A99 and then tried again without effect. Should I try and change the source data? that doesn't make much sense.

kr Jens

Former Member
0 Kudos

Hi, no, you shouldn't have to do that.  Was that the entire script in your original post?  Are there any temporary accounts in your script or it's that straight forward?  It's weird that it worked the once and not again.  The log showed correct writing result. There was one other change we had to do to our scripts to make them work in 10 from 7 but it had to do with temporary accounts. -Tracey

Former Member
0 Kudos

Hi

This is the whole script, I only did it for the first part because that is one separate query. Thank you for helping so far! Can you elaborate on the temporary accounts? It could be very helpful!

//Amounts linked to journals booked on A9 PG_TOT are copied to A99 PG_PI, PG_TR, PG_BE, PG_NL

//For PG_PI

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

*XDIM_MEMBERSET BRON=A9

*XDIM_MEMBERSET GROEP=PG_TOT

*CALCULATE_DIFFERENCE=1

*WHEN ENTITEIT.PG_PI

*IS "Y"

*REC(FACTOR=1,GROEP="PG_PI",BRON="A99")

*ENDWHEN

*COMMIT

//For PG_TR

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

*XDIM_MEMBERSET BRON=A9

*XDIM_MEMBERSET GROEP=PG_TOT

*WHEN ENTITEIT.PG_TR

*IS "Y"

*REC(FACTOR=1,GROEP="PG_TR",BRON="A99")

*ENDWHEN

*COMMIT

//For PG_BE

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

*XDIM_MEMBERSET BRON=A9

*XDIM_MEMBERSET GROEP=PG_TOT

*WHEN ENTITEIT.PG_BE

*IS "Y"

*REC(FACTOR=1,GROEP="PG_BE",BRON="A99")

*ENDWHEN

*COMMIT

//For PG_NL

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

*XDIM_MEMBERSET BRON=A9

*XDIM_MEMBERSET GROEP=PG_TOT

*WHEN ENTITEIT.PG_NL

*IS "Y"

*REC(FACTOR=1,GROEP="PG_NL",BRON="A99")

*ENDWHEN

*COMMIT

Former Member
0 Kudos

Hi Jens,  Where are you defining the variables you are using?

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

We use these all the time but have a line defining it before each script for ex:

 

*MEMBERSET(%ACCT1%,"Descendants([ACCOUNTST].[DOLLARS_TOTAL],99,LEAVES)")

 

*XDIM_MEMBERSET AccountSt=%ACCT1%

Otherwise the script looks good.  Maybe SAP support can help?  The thing we found with temp accounts.  Originally we had this set up in this example:

 

1)  *Select (%AccrWeeks%,"ID","Weeks","[ParentH1]='varBudYear.AllWeeks'")

 

*XDIM_MEMBERSET

Weeks=%AccrWeeks%,varBudYear.WKINP

 

*CALC_DUMMY_ORG

  *ORG WEEKS=PARENTH1

This was not working #1.

2) *CALC_DUMMY_ORG WEEKS=PARENTH1

It literally would not work unless the command was all on one line as shown in #2.

Hope it helps, Tracey

 

Former Member
0 Kudos

Hi Tracy,

We are passing along variables which we select in the data manager package by using these statements:

*XDIM_MEMBERSET VERSIE=%VERSIE_SET%

*XDIM_MEMBERSET PERIODE=%PERIODE_SET%

I think this issue will indeed be one for SAP support. Thanks!

kr

Jens

Former Member
0 Kudos

Hi Jens, would you mind letting me know the outcome?  I'm very curious...it is a straight forward script.  Thanks, Tracey

Former Member
0 Kudos

Hi Tracey,

I will

kr

jens

Former Member
0 Kudos

Upgrading to a new support pack is the answer

Kr

jens

Former Member
0 Kudos

Thanks Jens...Which support pack are you on? Thanks, Tracey

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

for which dimensions are you prompted when you run the script via data mangager? And are those the same dimensions for which you have selected a member when you debug the script?

Is PG_TOT a summation member in your group dimension?

BR,
Arnold

Former Member
0 Kudos

Hi Arnold,

Yes I have used the same selection in my debugger as in the data manager package: 2014.JAN, ACTUAL.

PG_TOT is a base level member in the parenth1 hierarchy but for consolidation purposes it is used as a parent in the PARENT_GROUP Property. What is more, I have the same issue for scripts that have a fixed member or variable for the 'GROEP' dimension

kr

jens