on 07-07-2014 12:24 PM
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
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
No Sap note could be found on this issue.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
6 | |
5 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.