cancel
Showing results for 
Search instead for 
Did you mean: 

Using two or more variables 7.5 NW

monica_marquez2
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member186338
Active Contributor
0 Kudos

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

monica_marquez2
Participant
0 Kudos

Hi Vadim,

below I describe what I want to store, (the green field is the result)

Thanx a lot!

former_member186338
Active Contributor
0 Kudos

Hi Monica,

What I understand from the provided picture is that you want to allocate 100000 (NO_CONTRACT, DSA99, 60220001) to each contract, DSA015, 60220001 based on FH000000 (USING/TOTAL).

Try to use *RUNALLOCATION

B.R. Vadim

monica_marquez2
Participant
0 Kudos

Hi Vadim,   How should use the run allocation?  It runs like a normal script? or do I need to do something in bw ...  Thanxs a lot...

Former Member
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

Hi Monica,

*RUNALLOCATION is a script logic operator, please read standard help about it.

B.R. Vadim

Former Member
0 Kudos

Hi Monica,

Create a logic script in BPC web admin.

Assign the script name to the allocation package in excel interface.

Regards,

Kalyan.

former_member186338
Active Contributor
0 Kudos

Hi Kalyan,

"Create a logic script in BPC web admin" - you are talking about BPC 10, for BPC 7.5 scripts are created in Admin client application.

Vadim

Former Member
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

Hi Kalyan,

The link you provided is not relevant to the question, the Nilanjan link to the description of *RUNALLOCATION statement is correct.

Vadim

Former Member
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

Hi Kalian,

Monica has no issues running "normal" scripts, the question was about allocation - and my answer was that it's a standard script operator.

Vadim

former_member221145
Participant
0 Kudos

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

monica_marquez2
Participant
0 Kudos

Im sorry i dont know how to write the code the right way....  This is the code exactly:

thanks a lot

Former Member
0 Kudos

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.

monica_marquez2
Participant
0 Kudos

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!

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Monica,

Can you please post the script in a more readable format?