on 2016 Apr 20 6:59 PM
Hi all,
We are on SAP BW 7.4 SP 09 with SAP BPC 10.1 SP 4
We have developed an input schedule and a script logic.
When we save the plan data the script logic is performed via the default logic.
When we enter plan data for one item of the input schedule the script logic is working according to our expectations.
When we enter or change plan data for several items the script logic does not work properly any more and we get as a result multiple values. Surprisingly the wrong result is the multiple of the number of the plan data to the items that we changed.
We have no explanation for this behaviour and we did not find notes in OSS that fit to our problem.
Could you please help us?
Thanks in advance and best regards
Gerd
Request clarification before answering.
Hi Gerd,
You need provide the script logic & the plan input form & also explination of bussiness scenario behind the logic written. So that we can try to figure it out.......
Regards,
Aravind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
we are onBPC NW 10.1 SP 04, Engine ABAP.
In the model Planning we have the following dimensions: COMPANY_CODE (ENTITY), TIME (T), VERSION (C), CURRENCY (R), P_FACHBEREICH (User Def), P_ACCOUNT (Account)
In the ACCOUNT dimension there are members 930000425100 (EXP), 900000425100 (EXP), 10000000425100 (INC), 930000425200 (EXP), 900000425200 (EXP), 10000000425200 (INC), 930000420100 (EXP), 900000420100 (EXP), 10000000420100 (INC), 930000420200 (EXP), 900000420200 (EXP), 10000000420200 (INC),
We want to calculate in default.lgf 10000000425100=930000425100*900000425100*31, 10000000425200 =930000425200*900000425200*31, 10000000420100=930000420100*900000420100*31, 10000000420200=930000420200*900000420200*31. 31 is the number of days in the month of January. When user enter or change any or all members 930000425100, 900000425100, 930000425200, 900000425200, 930000420100, 900000420100, 930000420200, 900000420200 in the input schedule and save data the values of the members of P_ACCOUNT 10000000425100, 10000000425200, 10000000420100, 10000000420200 have to be calculated.
The script:
*XDIM_MEMBERSET VERSION = PLAN
*WHEN TIME
*IS 2016.01
*REC(EXPRESSION=[P_ACCOUNT].[930000425100]*[P_ACCOUNT].[900000425100]*31,P_ACCOUNT="10000000425100")
*REC(EXPRESSION=[P_ACCOUNT].[930000425200]*[P_ACCOUNT].[900000425200]*31,P_ACCOUNT="10000000425200")
*REC(EXPRESSION=[P_ACCOUNT].[930000420100]*[P_ACCOUNT].[900000420100]*31,P_ACCOUNT="10000000420100")
*REC(EXPRESSION=[P_ACCOUNT].[930000420200]*[P_ACCOUNT].[900000420200]*31,P_ACCOUNT="10000000420200")
*ENDWHEN
*COMMIT
In UJKT we test this script with Data Region:
TIME=2016.01
VERSION=PLAN
The values for ACCOUNTs in the report are:
930000425100 - Pflegesatz Altenheim SHE | 2 |
930000425200 - Pflegsatz Altenheim SZ | 0 |
930000420100 - Pflegesatz PS0 SHE | 0 |
930000420200 - Pflegsatz PS0 SZ | 26,5 |
900000425100 - Bewohner Altenheim SHE | 10 |
900000425200 - Bewohner PS Altenheim SZ | 0 |
900000420100 - Bewohner PS 0 SHE | 0 |
900000420200 - Bewohner PS 0 SZ | 25 |
Expected result: The expected results are the following:
10000000425100 - Vollstationär Altenheim Sozialhilfeträge | 620 |
10000000425200 - Vollstationär Altenheim Selbstzahler | 0 |
10000000420100 - Vollstationär Pflegestufe 0 Sozialhilfet | 0 |
10000000420200 - Vollstationär Pflegestufe 0 Selbstzahler | 20537,5 |
These are the results that we expected. So basically the script logic works fine. We get the problem when we use the pull down functionality of MS EXCEL to enter the values.
930000425100 - Pflegesatz Altenheim SHE | 3 |
930000425200 - Pflegsatz Altenheim SZ | 3 |
930000420100 - Pflegesatz PS0 SHE | 3 |
930000420200 - Pflegsatz PS0 SZ | 3 |
900000425100 - Bewohner Altenheim SHE | 10 |
900000425200 - Bewohner PS Altenheim SZ | 0 |
900000420100 - Bewohner PS 0 SHE | 0 |
900000420200 - Bewohner PS 0 SZ | 25 |
If we now save the values
930000425100 - Pflegesatz Altenheim SHE | 3 |
930000425200 - Pflegsatz Altenheim SZ | 3 |
930000420100 - Pflegesatz PS0 SHE | 3 |
930000420200 - Pflegsatz PS0 SZ | 3 |
we get the following results:
10000000425100 - Vollstationär Altenheim Sozialhilfeträge | 3720 |
10000000425200 - Vollstationär Altenheim Selbstzahler | 0 |
10000000420100 - Vollstationär Pflegestufe 0 Sozialhilfet | 0 |
10000000420200 - Vollstationär Pflegestufe 0 Selbstzahler | 9300 |
We expect for member 10000000425100 of dimension P_ACCOUNT the result 930 (10 x 3 x 31) and for member 10000000420200 of dimension P_ACCOUNT the result 2325 (25 x 3 x 31)
We only get this error in the calculation if copy and paste the values into the input schedule from another excel sheet or if we use the pull down functionality of MS Excel.
Result in UJKT:
LGX:
*XDIM_MEMBERSET VERSION = PLAN
*WHEN TIME
*IS 2016.01
*REC(EXPRESSION=[P_ACCOUNT].[930000425100]*[P_ACCOUNT].[900000425100]*31,P_ACCOUNT=10000000425100)
*REC(EXPRESSION=[P_ACCOUNT].[930000425200]*[P_ACCOUNT].[900000425200]*31,P_ACCOUNT=10000000425200)
*REC(EXPRESSION=[P_ACCOUNT].[930000420100]*[P_ACCOUNT].[900000420100]*31,P_ACCOUNT=10000000420100)
*REC(EXPRESSION=[P_ACCOUNT].[930000420200]*[P_ACCOUNT].[900000420200]*31,P_ACCOUNT=10000000420200)
*ENDWHEN
*COMMIT
-------------------------------------------------------------------------------------------------------------------------------------
LOG:
FILE:\ROOT\WEBFOLDERS\PLANUNG_FI_RD6 \ADMINAPP\PLANNING\TEST.LGF
USER:A114679
APPSET:PLANUNG_FI_RD6
APPLICATION:PLANNING
[INFO] GET_DIM_LIST(): I_APPL_ID="PLANNING", #dimensions=7
COMPANY_CODE,CURRENCY,MEASURES,P_ACCOUNT,P_FACHBEREICH,TIME,VERSION
#dim_memberset=1
VERSION:PLAN,1 in total.
REC :[P_ACCOUNT].[930000425100]*[P_ACCOUNT].[900000425100]*31
REC :[P_ACCOUNT].[930000425200]*[P_ACCOUNT].[900000425200]*31
REC :[P_ACCOUNT].[930000420100]*[P_ACCOUNT].[900000420100]*31
REC :[P_ACCOUNT].[930000420200]*[P_ACCOUNT].[900000420200]*31
CALCULATION BEGIN:
QUERY PROCESSING DATA
QUERY TIME : 1.00 ms. 2188 RECORDS QUERIED OUT.
QUERY REFERENCE DATA
QUERY TIME : 1.00 ms. 2188 RECORDS QUERIED OUT.
CALCULATION TIME IN TOTAL :1.00 ms.
648 RECORDS ARE GENERATED.
CALCULATION END.
SCRIPT RUNNING TIME IN TOTAL:3.00 s.
What is the reason?
We get the problem when we use the pull down functionality of MS EXCEL to enter the values.
930000425100 - Pflegesatz Altenheim SHE | 3 |
930000425200 - Pflegsatz Altenheim SZ | 3 |
930000420100 - Pflegesatz PS0 SHE | 3 |
930000420200 - Pflegsatz PS0 SZ | 3 |
900000425100 - Bewohner Altenheim SHE | 10 |
900000425200 - Bewohner PS Altenheim SZ | 0 |
900000420100 - Bewohner PS 0 SHE | 0 |
900000420200 - Bewohner PS 0 SZ | 25 |
If we now save the values
930000425100 - Pflegesatz Altenheim SHE | 3 |
930000425200 - Pflegsatz Altenheim SZ | 3 |
930000420100 - Pflegesatz PS0 SHE | 3 |
930000420200 - Pflegsatz PS0 SZ | 3 |
we get the following results:
10000000425100 - Vollstationär Altenheim Sozialhilfeträge | 3720 |
10000000425200 - Vollstationär Altenheim Selbstzahler | 0 |
10000000420100 - Vollstationär Pflegestufe 0 Sozialhilfet | 0 |
10000000420200 - Vollstationär Pflegestufe 0 Selbstzahler | 9300 |
We expect for member 10000000425100 of dimension P_ACCOUNT the result 930 (10 x 3 x 31) and for member 10000000420200 of dimension P_ACCOUNT the result 2325 (25 x 3 x 31)
We only get this error in the calculation if copy and paste the values into the input schedule from another excel sheet or if we use the pull down functionality of MS Excel.
Thanks in advance and best regards
Gerd
Hi Gerd,
Traditional mistake The correct script will be:
*WHEN VERSION
*IS PLAN
*WHEN TIME
*IS 2016.01
*WHEN P_ACCOUNT
*IS 930000425100
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000425100]*31,P_ACCOUNT="10000000425100")
*IS 930000425200
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000425200]*31,P_ACCOUNT="10000000425200")
*IS 930000420100
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000420100]*31,P_ACCOUNT="10000000420100")
*IS 930000420200
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000420200]*31,P_ACCOUNT="10000000420200")
*ENDWHEN
*ENDWHEN
*ENDWHEN
*WHEN VERSION
*IS PLAN
*WHEN TIME
*IS 2016.01
*WHEN P_ACCOUNT
*IS 900000425100
*REC(EXPRESSION=[P_ACCOUNT].[930000425100]*%VALUE%*31,P_ACCOUNT="10000000425100")
*IS 900000425200
*REC(EXPRESSION=[P_ACCOUNT].[930000425200]*%VALUE%*31,P_ACCOUNT="10000000425200")
*IS 900000420100
*REC(EXPRESSION=[P_ACCOUNT].[930000420100]*%VALUE%*31,P_ACCOUNT="10000000420100")
*IS 900000420200
*REC(EXPRESSION=[P_ACCOUNT].[930000420200]*%VALUE%*31,P_ACCOUNT="10000000420200")
*ENDWHEN
*ENDWHEN
*ENDWHEN
Without useless COMMIT!
Vadim
Hello Vadim,
thanks a lot for your help.
I have developed a script logic according to your suggestions.
Now I get another error. When I perform an initial calculation with the script logic when all values have been 0 (Zero) before I get double values.
When I change the values after this wrong first calculation the results that are generated for newly entered data are correct.
What can I do to get correct result when all values in the input schedule have been 0 (Zero) before?
Thanks in advance and best regards
Gerd
Sorry, but absolutely not clear!
"When I perform an initial calculation with the script logic when all values have been 0 (Zero) before I get double values." - what do you mean - initial calculation? How you perform it?
Please describe step by step!
My script is developed for use as default.lgf - not for DM package or UJKT!
For DM package you have to scope data using XDIM_MEMBERSET:
*XDIM_MEMBERSET VERSION=PLAN
*XDIM_MEMBERSET TIME=2016.01
*XDIM_MEMBERSET P_ACCOUNT=930000425100,930000425200,930000420100,930000420200
*WHEN P_ACCOUNT
*IS 930000425100
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000425100]*31,P_ACCOUNT="10000000425100")
*IS 930000425200
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000425200]*31,P_ACCOUNT="10000000425200")
*IS 930000420100
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000420100]*31,P_ACCOUNT="10000000420100")
*IS 930000420200
*REC(EXPRESSION=%VALUE%*[P_ACCOUNT].[900000420200]*31,P_ACCOUNT="10000000420200")
*ENDWHEN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gerd,
Could you provide more details/screenshots about your issue? What does your input form look like and what is the script written in default logic?
Thanks,
Varsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 7 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.