on 07-11-2013 4:26 PM
Hi all! We are working with SAP BPC 7.5 NW We have a script logic where using two variables, the code is like this: *SELECT (%FUEL%,"[ID]","ACCOUNTL","[ALLOCATION]='GENERAL' AND [AR]='AR1'") *XDIM_MEMBERSET ACCOUNTL= %FUEL%,FH000000 *XDIM_MEMBERSET AIRCRAFT = BAS(A00000) *XDIM_MEMBERSET BASE = L99999 *XDIM_MEMBERSET Category = ACTUAL *XDIM_MEMBERSET CECO = BAS(CE_TOTAL) *XDIM_MEMBERSET CGROUPS = LC *XDIM_MEMBERSET CONTRACT = BAS(C_TOTAL) *XDIM_MEMBERSET DATASRC = DSA99 *XDIM_MEMBERSET INTCOL = I_NONE *XDIM_MEMBERSET LEGALENTITY = *XDIM_MEMBERSET Time = %Time_SET% *WHEN ACCOUNTL *IS "FH000000" *WHEN AIRCRAFT *IS * *WHEN CONTRACT *IS <> "NO_CONTRACT" *REC(FACTOR=1, CONTRACT="DUMMY") *ENDWHEN *ENDWHEN *ENDWHEN *WHEN ACCOUNTL *IS "FH000000" *WHEN AIRCRAFT *IS * *WHEN CONTRACT *IS <>"NO_CONTRACT" *REC(EXPRESSION=(-([ACCOUNTL].[%FUEL%], [CONTRACT].NO_CONTRACT]))*%VALUE%/([CONTRACT].DUMMY]),ACCOUNTL="%FUEL%",DATASRC="DSA015") *ENDWHEN *ENDWHEN *ENDWHEN *COMMIT The objective is to estimate a weight and multiplying by a ratio. I dont have any error in the administration panenl, but I run the story logic package I get the following error ... RUN_LOGIC:Unknown Dimension Name in Keyword: "60210001: This account has the property than we have in the select. It is posible that I can not use two variables at once? thanks
Hi Monica,
It looks that the code have to be completely redesigned (errors like Nilanjan pointed, possible duplication, wrong scoping...).
Please describe what you want to achieve, then I will be able to help you (with the list of account members and calculation logic).
B.R. Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monica,
For running an allocation engine, you just need to prepare your script in BPC, accordingly. There is nothing to be done in BI. Please refer to the below link from help.sap for allocation:
http://help.sap.com/saphelp_bpc75_nw/helpdata/en/56/b10a71d21b4f0eb69a4a79a050a563/content.htm
Hope this helps.
Hi Vadim,
Sorry, I missed to see the version.
Monica,
Please refer this link for details
http://help.sap.com/saphelp_bpc75_nw/helpdata/en/ac/be368e9afa4db9b00e789706491511/content.htm
Regards,
Kalyan.
Hi Vadim,
The link I mentioned is basically specifying the steps to create the script.
"You can create a script logic file for the
consolidation engine by choosing Admin Console -> Expand Required Application . In Script Logic Editor, you can create a script logic file using the K2 script."
As for allocation script the link is already provided by Nilanjan.
Regards,
Kalyan.
Hi Monica,
If I understood the logic correctly, below are my findings which need to be corrected. Also you can use two variables in XDIM_MEMBERSET. I would recommend you to validate the select statement and the XDIM_MEMBERSET in UJKT to see the result. You can go through the below link
http://scn.sap.com/docs/DOC-31043
1) Incomplete scoping *XDIM_MEMBERSET LEGALENTITY =
2) Remove the single quotes from the select statement for ex it should be SELECT(%FUEL%,[ID],ACCOUNTL,"[ALLOCATION]=GENERAL AND [AR]=AR1")
3) The same WHEN condition is checked twice which is not needed. I don't see the result of 1st calculation is not being used in the second part.
4) Is BASE a dimension?
5) In the second REC statement [CONTRACT].NO_CONTRACT] this should be corrected as [CONTRACT].[NO_CONTRACT] and the same applies to [CONTRACT].[DUMMY]
*SELECT (%FUEL%,"[ID]","ACCOUNTL","[ALLOCATION]='GENERAL' AND [AR]='AR1'")
*XDIM_MEMBERSET ACCOUNTL= %FUEL%,FH000000
*XDIM_MEMBERSET AIRCRAFT = BAS(A00000)
*XDIM_MEMBERSET BASE = L99999
*XDIM_MEMBERSET Category = ACTUAL
*XDIM_MEMBERSET CECO = BAS(CE_TOTAL)
*XDIM_MEMBERSET CGROUPS = LC
*XDIM_MEMBERSET CONTRACT = BAS(C_TOTAL)
*XDIM_MEMBERSET DATASRC = DSA99
*XDIM_MEMBERSET INTCOL = I_NONE
*XDIM_MEMBERSET LEGALENTITY =
*XDIM_MEMBERSET Time = %Time_SET%
*WHEN ACCOUNTL
*IS "FH000000"
*WHEN AIRCRAFT
*IS *
*WHEN CONTRACT
*IS <> "NO_CONTRACT"
*REC(FACTOR=1, CONTRACT="DUMMY")
*ENDWHEN
*ENDWHEN
*ENDWHEN
*WHEN ACCOUNTL
*IS "FH000000"
*WHEN AIRCRAFT
*IS *
*WHEN CONTRACT
*IS <>"NO_CONTRACT"
*REC(EXPRESSION=(-([ACCOUNTL].[%FUEL%],[CONTRACT].NO_CONTRACT]))*%VALUE%/([CONTRACT].DUMMY]),ACCOUNTL="%FUEL %",DATASRC="DSA015")
*ENDWHEN
*ENDWHEN
*ENDWHEN
*COMMIT
Hope this helps,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monica,
The problem is with the second WHEN statement in which you are assigning the result to ACCOUNTL = %FUEL%. However, %FUEL% is a variable populated by your select statement, which has multiple members. Using a single REC statement, you cannot write data to multiple members of the same dimension. Please try the below code for the second WHEN statement:
*WHEN ACCOUNTL
*IS FH000000
*WHEN AIRCRAFT
*IS *
*WHEN CONTRACT
*IS <> NO_CONTRACT
*FOR %MYFUEL% = %FUEL%
*REC(...) - write the entire REC statement, instead of ACCOUNTL = %FUEL%, use ACCOUNTL = %MYFUEL%
*NEXT
*ENDWHEN
*ENDWHEN
*ENDWHEN
Hope this helps.
Hi Nilanjan,
If I change my logic using FOR works ok when %FUEL% is for one members only.
I still have a problem because I have to repeat for the more variables within the same script, and these variables have some members.
For example:
*FOR %MYMAINT%=%MAINT%
*REC(________, ACCOUNTL=%MYMAINT%,___)
*NEXT
%MAINT% has 4 members ACCOUNTL, when I run logic appear a error:
RUN_LOGIC:Unknown Dimension Name in Keyword: "60210001:
So It is possible that FOR statement works only when the variable %MAINT% has a member only?
Thanx a lot!
Hi Monica,
Yes it is possible to use two variables at once.
But I guess there is some issue with your script, did you validate it before you ran it.
For e.g,
*XDIM_MEMBERSET LEGALENTITY =
looks incomplete.
Regards,
Kalyan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monica,
Can you please post the script in a more readable format?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
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.