Syntax in script logic

Hi Friends,
I have input schedule in below format.
Product   Rate/2011.INP  Packing/2011.INP QTY/2011.APR AMOUNT/2011.APR QTY/2011.MAY AMOUNT/2011.MAY
PM         3                 3              3               27            4         36
PN        5            2          2          20     3  30
Here Amount= Rate*Packing*QTY. Pls correct below script logic and make it generic for all months.
*XDIMMEMBERSET TIME=2011.APR,2011.MAY,2011.INP
*XDIMMEMBERSET ACCT=QTY,RATE,PACK,AMOUNT
*WHEN ACCT
*IS QTY
*WHEN TIME
*IS 2011.APR,2011.MAY,2011.INP
*REC(EXPRESSION=%VALUE% * ([ACCT].[RATE],[TIME].[2011.INP])
                         * ([ACCT].[PACK],[TIME].[2011.INP]),
                             [ACCT]=AMOUNT,[TIME].[2011.APR])
*ENDWHEN
*ENDWHEN
*COMMIT
Thanks,
Naresh

Hi,
You can simply write this using MDX formula,
[ACCT].[#AMOUNT]=[ACCT].[PACK]*([ACCT].[RATE],[TIME].[2011.INP])*([ACCT].[QTY],[TIME].[2011.INP])
Run this code with required months from DM package it gets executed for defined time periods.
Hope this helps,
Regards,
G.Vijaya Kumar

Similar Messages

  • How can i write this syntax in script logic....

    hi all
    i need to write below syntax in bpc script logic..
    If Headcount = 0, then Salary = 0 Else:
    If Month <> March and Month <> September:
    Salary = Salaryprevious month1 + [(Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)]
    If Month = March:
    Salary = [Salaryprevious month1 + [(Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)]  ] * (100% + Band Annual Increase + Band Annual Increase Factor)
    in the above code headcount,salary,bandrate etc all got ids.
    thanks guys

    Hi,
    In your query, when you say that headcount = 0, do you mean the signed data? In this case, it will difficult to do. When you have a signed data as 0 in SQL, once you optimize the application or compress it, that particular record will go and your logic will not work.
    If I look at your logic,
    If Headcount = 0, then Salary = 0 Else:
    If Month March and Month September:
    Salary = Salaryprevious month1 + (Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)
    If Month = March:
    Salary = [Salaryprevious month1 + (Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)] * (100% + Band Annual Increase + Band Annual Increase Factor)
    If the application has been compressed or optimized, it will not get any record for that particular headcount and will directly go into the "else" loop. Though, its not correct.
    I hope you got my point.

  • Script Logic Syntax Help

    Hello,
    Like for example I have two dimension like P_ACCT ve PRODUCT.
    In P_ACCT dimension I have two members like ACCOUNT1 and ACCOUNT2, and in PRODUCT dimension I have a one members called PER_1100.
    I want to update PRODUCT.PER_1100 with ACCOUNT1 / ACCOUNT2 * 100 value. 
    Example =
    ACCOUNT1 = 50
    ACCOUNT2 = 200
    PRODUCT.PER_1100 = ACCOUNT1 / ACCOUNT2 * 100 = 50 / 200 * 100 = 25
    I wrote a script like below but it doesn't work.
    *WHEN P_ACCT
    *IS ACCOUNT1
        *REC(FACTOR=[P_ACCT].[ACCOUNT2]*0.01,PRODUCT="PER_1100")
    *ENDWHEN
    *COMMIT
    Regards,
    Burak

    Hello,
    I didn't face any problem about this script logic. It works fine. You can use it. I developed this script.
    *WHEN P_ACCT
    *IS KFNETCIRO
        *WHEN PRODUCT
        *IS TOT_BUD_10
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1101]),P_ACCT="KFNETCIRO",PRODUCT="1101")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1102]),P_ACCT="KFNETCIRO",PRODUCT="1102")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1103]),P_ACCT="KFNETCIRO",PRODUCT="1103")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1104]),P_ACCT="KFNETCIRO",PRODUCT="1104")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1105]),P_ACCT="KFNETCIRO",PRODUCT="1105")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1106]),P_ACCT="KFNETCIRO",PRODUCT="1106")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1107]),P_ACCT="KFNETCIRO",PRODUCT="1107")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1108]),P_ACCT="KFNETCIRO",PRODUCT="1108")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_1109]),P_ACCT="KFNETCIRO",PRODUCT="1109")
        *REC(EXPRESSION=%VALUE%*0.01*([P_ACCT].[KFORANLAR],[PRODUCT].[NC_9900]),P_ACCT="KFNETCIRO",PRODUCT="9900")
        *ENDWHEN
    *ENDWHEN
    *COMMIT
    [#KFBRUTKAR] = [KFNETCIRO] - [KFSMM]
    [#KFURBRKAR] = [KFNETCIRO] - [KFSMM] - [KFISKARTA]
    [#KFMAGBRKAR] = [KFNETCIRO] - [KFSMM] - [KFISKARTA] - [KFAMBALAJ]
    *COMMIT
    I hope it helps to you.
    Regards,
    Burak

  • Script Logic: Using a property in MDX *REC statement (BPC NW)

    Hi,
    Is it possible to use a Property in an MDX statement without using  *LOOKUP() function? I have script successfully working but it takes 15 minutes to execute and would like to speed it up.
    I understand that [DIMENSION].[MEMBER].Property is not valid syntax, and do not believe NW has any other functions to resolve the issue, except *LOOKUP which takes a long time.
    Specific Example is below:
    I have a piece of script that successfully splits JV Expense by customers. A Profit Share planning driver determines the percentage that each customer is entitled to. Typically this will be 100%, but could be 50% between two customers.
    The PROFIT SHARE planning drivers records, and PARTNER_INCOME transactional records are below:
    ACCOUNT
    ENTITY
    PARTNER
    SIGNED DATA
    PROFIT_SHARE
    UK_001
    PARTNER_A
    0.5
    PROFIT_SHARE
    UK_001
    PARTNER_B
    0.5
    PROFIT_SHARE
    UK_002_PLANNING_DRIVERS
    PARTNER_B
    1.00
    PARTNER_INCOME
    UK_001
    NO_PARTNER
    $5,000
    PARTNER_INCOME
    UK_002
    NO_PARTNER
    $5,000
    UK_001 has two partners that are each entitled to 50% of the $5,000 NET PROFIT.
    For UK_002, one one single Partner is entitled to 100% of the $5,000 NET PROFIT.
    Using script logic, you can scope the Profit Share account (PROFIT_SHARE) - , and use a *REC statement to multiply this by the driver. It would look like:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *REC (EXPRESSION = %VALUE% * ([ACCOUNT].[PROFIT_SHARE],[PARTNER].[NO_PARTNER]), ACCOUNT = PARTNER_PROFIT_SHARE)
    *ENDWHEN
    This wouldn't be a problem if the Planning Driver is always stored on the same Entity that the Income is stored on, but for UK_002, the planning driver is stored on another Entity - which is stored in a the PLAN_DRIVER_REF property of the entity. It should use UK_002_PLAN_DRIVERS
    ID (Entity)
    PLAN_DRIVER_REF
    UK_001
    UK_002
    UK_002_PLAN_DRIVERS
    UK_002_PLANNING_DRIVERS
    In this scenario, we need to switch out the Entity used in the MDX, however I do not believe you can use a property in MDX - can anyone confirm?
    I have currently implemented the *LOOKUP functionality to loop through, changing each *LOOKUP partner for each loop.
    Lookup:
    *LOOKUP PLANNING_JV_US
    *FOR %LOOP_ASLS% = %ASL_LOOKUP_LOOP_VARIABLE%        
      *DIM LOOK_%LOOP_PARTNERS%:ACCOUNT = "PROFIT_SHARE"
      *DIM LOOK_%LOOP_PARTNERS%:PARTNER= %LOOP_PARTNERS%
    *NEXT
    *DIM ENTITY = ENTITY.PLAN_DRIVER_REF                   //   Use PLAN_DRIVER_REF Property of Entity
    *ENDLOOKUP
    Scope and *REC:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *FOR %LOOP_PARTNERS% = %PARTNER_LOOKUP_LOOP_VARIABLE%      // 1000 Partners
    *REC(EXPRESSION = %VALUE% * LOOKUP(LOOK_%LOOP_PARTNERS%), PARTNER= %LOOP_PARTNERS%, ACCOUNT = TCOJVSHAR_CALC, AUDIT_ID = PP_EXPENSE_BY_PARTNER)
    *NEXT
    *ENDWHEN
    The problem with the above, is that because the Lookup is being generated for every single Partner, there are significant numbers of loops.
    Does anyone know of another way this can be implemented in Script Logic? Otherwise we'll need to explore BAdI route.
    Thanks,
    Nick

    Hi Nick,
    Use property in LOOKUP - will dramatically speed up the calculation without FOR/NEXT.
    Vadim

  • SQL functions in Script Logic

    I want to build a script logic but the dimensions that I am testing do not have the fields I want in the format I want. In my case I would like to test the "Start" property in the Employee dimension. The property represents the employee start date but is a var char in the format dd.mm.yyyy rather thna a date field. I want to test whether it is five years prior to the date being processed.
    My time dimension has a year property and a monthnum property. Each of these are varchar. I can write SQL that would convert these to a date and compare them with the start property on the employee dimension.
    Can I  do iinsert SQL functions in the When statement. An example would be
    *When convert(datetime, substring(employee.start,4,2) + '/' + substring(employee.start,1,2) + '/' + substring(employee.start,7,4))
    Can I use  SQL functions in the Is statement? An example would be
    *Is <DateAdd(YY,-5 , convert(datetime, Time.Monthnum + '/01/'' + time.year)
    Finally when I use such techniques and look at the log by using "show log" in the logic debugger I see no reference to the SQL I used. It is as if the generated SQL has not made use of my functions. Instead all I seee are the extract statements from the three fact tables. Is this normal? Is there a way to see what SQL is really being generated and run?
    At the moment it seems my only option is to make changes, try running it and hope I get an output. If no records are written I can't be sure whether it is because embedding SQL function is not supported or because I have made some other error.

    No, the "BPC SQL" script logic doesn't allow for this extensive use of real SQL within the scripting syntax. As a concept, it's best to think of "BPC SQL" script logic as, "this unique BPC logic syntax will generate real SQL code when it's executed."
    There's very little real SQL that you can use within the syntax itself, and definitely not within the WHEN or IF statements.  Nothing like cast, convert, substring, etc. (Except you CAN use these, a little bit, in a *SELECT statement. But I don't see how that will solve your current problem.)
    Plus, when you consider how the logic engine processes a set of data, it's helpful to think of it in terms of selects & reading through a recordset. So in that regard, a SQL background can be helpful, in understanding the concepts. (Sort of helpful, except when it confuses you, or frustrates you since you don't have all the power you want.)
    Anyway, to solve your problem, you might be able to restate the problem, and then use something like this code, which is valid syntax:
    *WHEN TIME.TIMEID
    *IS >= VERSION.FirstPlanMonthTimeID
    In this case, FirstPlanMonthTimeID is set up in the version dimension as, for example, 20090400 (representing 2009.APR). This timeID is set by BPC automatically when processing the time dimension, and I need to ensure that my Version property value is set to match it.
    A key point is that in BPC fact tables, the time dimension is stored as TIMEID (not ID, unlike all the other dimensions), and can be used for comparative evaluation in script logic WHEN/IF. The comparison property needs to be stored as an 8-digit integer value. If your time dimension has days in it (along with months), check the TIMEID after processing, and you should see the pattern for assigning values to TIMEID for days and months, etc.
    Normally, TIMEID is assigned pretty sensible and stable values. If it doesn't meet your logic requirements, you can create another property (be careful of USERTIMEID, since that has a specific purpose in the system which I've never fully understood) and assign that whatever (integer) values make sense.

  • Logical Error in Script Logic

    Hello Experts,
    Please provide your guidance for the following scenario.
    I need to calculate the 'Accumulated Depreciation' for every month, based on the amounts in the 'AccumDep' and the 'Depreciation' accounts.
    In other words, the value of the Accumulated Depreciation for the month of Feb should be equal to (Accumulated Depreciation in Jan + Depreciation in Jan), and so on.
    To accomplish this, I have written the following script logic.
    *WHEN ACCOUNT
    *IS AccumDep, Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(FACTOR=1, ACCOUNT=AccumDep, TIME=%MON%)
         *NEXT
    *ENDWHEN
    *COMMIT
    The above logic was validated without any 'syntax' errors.  However, I do not see the desired results, as the Accumulated Depreciation is not getting updated every month.  The amount from FEB appears for MAR & APR also.
    Therefore, could you please review the above script and let me know if there are any 'logical' errors?
    All your guidance is greatly appreciated.  Thanks...

    Hi,
    You are not getting the desired result because you are trying to aggregate the depreciation and the accumulated depreciation of the same month and post the result again in the same month. Lets say the code is working for 2009.MAR. You are trying to add the depreciation and accumulated depreciation of 2009.MAR. However, you still dont have the acc depreciation of 2009.MAR. You basically need to take the acc depreciation of the previous month.
    You can try something like:
    *WHEN ACCOUNT
    *IS Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(EXPRESSION = %VALUE% + ([ACCOUNT].[AccumDep],[TIME].Previous), ACCOUNT=AccumDep)
         *NEXT
    *ENDWHEN
    *COMMIT
    You can have a property called Previous to store the previous month of each period in the time dimension.
    Hope you got the idea.

  • Conditional Checking in Script Logic

    Could anyone please kindly enlightened me how I could code the following in the script logic?
    Scenario:
    IF A > 0, THEN B = C * D
    I have tried with SELECTCASE statement statement but all wouldn't work, I keep getting errors...
    SELECTCASE:
    *SELECTCASE [P_ACCT].[0005]
    *CASE > 0
             *REC(EXPRESSION= ([P_ACCT].[0004] * [P_ACCT].[0003]), P_ACCT=0001)
    *ENDSELECT
    Error:
    UJK_VALIDATION_EXCEPTION:Unknown or unimplemented keyword "*REC(EXPRESSION=IIF([MATERIAL].[LDG0005]=>0,([MATE"...
    Thank you very much in all advances.
    Best regards,
    Yen Li

    Hi Yen Li,
    Applying SELECTCASE - ENDCASE combination would not produce the desired results. Instead, use Validation Business Rules - by setting up Validation Rules and Validation Rules Details and run the Stored Procedure SPRUNVALID from the Default Logic to execute these validation rules. Call the Stored Procedure by the following syntax:
    RUN_STORED_PROCEDURE=SPRUNVALID(u2018applicationu2019,u2019categoryu2019,u2019currencyu2019,u2019%SCOPETABLE%u2019,u2019%LOGTABLE%u2019)
    Your command: u201CIf P_ACCT.0005 is > 0, multiply P_ACCT.0004 by P_ACCT.0005 and post the product in P_ACCT.0001. Otherwise do not do anything.u201D will be shown in result!
    Regards.
    Chakrapani

  • MEASURES in script logic

    Hi All!
    How can I use YTD measures in script logic? My aplication is PERIODIC ( YTDInput set to No) and I need in my script logic to use YTD values for some calculation. I tried following syntax
    *REC(EXPRESSION=([C_ACCT].[PLM],[MEASURES].[YTD]))
    but after validation error appears
    http://screencast.com/t/q2gChPrqbVXy.
    Please help, how to use measures dim in script logic??
    Regards,
    Justyna

    Full script not it is working fine after change *XDIM_MEMBERSET MEASURES=YTD to *XDIM_MEMBERSET MEASURES=PERIODIC
    *XDIM_MEMBERSET C_ACCT = VALCON_EN020
    *XDIM_MEMBERSET MEASURES=PERIODIC
    *WHEN_REF_DATA = MASTER_DATA
    *WHEN C_ACCT
    *IS VALCON_EN020
    *REC(EXPRESSION=([C_ACCT].[PLM],[MEASURES].[YTD]))
    *ENDWHEN
    *COMMIT

  • Use of Variable in Script Logic

    Dear All,
    We are working on a BPC Script Logic involving depreciation calculation, which calls an implementation of the BAdI BADI_UJ_CUSTOM_LOGIC. We are passing some parameters from the script logic to the BAdI. There are two parameters to be passed: an account number (Account in which the posting will happen), and the rate (rate with which depreciation will be affected). The parameters are stored in the Dimension member of the account dimension and need to be fetched from there. We are using the following piece of code to achieve this:
    *INCLUDE FUNCTIONS.LGF
    [#PERC] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_PERCENTAGE)
    [#DEPACCOUNT] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_ACCT)
    *START_BADI DEPR
    QUERY = ON
    WRITE = ON
    DEPACCT = [#DEPACCOUNT]
    PERCENTAGE = [#PERC]
    *END_BADI
    Here, FUCNTIONS.LGF contains the PRO function, which fetches the account and percentage properties from the account dimension member. Problem is, when we refer to the temporary variables within our code using the variables [#DEPACCOUNT] and [#PERC], we encounter a short dump for CX_SY_CONVERSION_NO_NUMBER. We suspect that instead of passing the parameter values, the logic is passing the variable name as the value. How do we rectify this? What is the correct syntax for passing such a parameter to the BAdI? Any ideas?
    Thanks in Advance,
    Sid

    Hi Ethan,
    Thanks for the answer. Unfortunately, even after trying out your solution with K2 variables, we are getting the same dump, this time the log says:
    An exception with the type CX_SY_CONVERSION_NO_NUMBER occurred, but was neither handled locally, nor declared in a raising clause
    The argument '%PERC%' cannot be interpreted as a number
    We are starting to think that maybe only substitution variables can be passed as parameter to the BAdI call, because whenever we use a local variable, we end up in passing the variable name to the BAdI, and not the variable value. We digged through the SAP Help, following is the excerpt from there:
    Run the following instruction to call custom ABAP programs: where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    *START_BADI <filter_value_of_your_BADI_implementation>
    <key1> = <value1>
    <key2> = <value2>
    *END_BADI
    where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    Does this mean we can only pass <key>:<value> pairs, and not <key>:<variable> pairs? Is there any instance / documentation which points to this (or the contrary)?
    Awaiting answers.
    Thanks and Regards,
    Sid

  • Script Logic choice SQL or MDX in NW release?

    Hi experts,
    I have encountered some opposite arguments in forum. Please can you clarify NW release script logic choice should be as MS release?
    In [Script Logic BPC MS (SQL) vs. NW (ABAP); Tim Klem states
    - "Write the logic using BPC SQL script logic syntax (not MDX) for performance reasons" but this opinion based on MS version. How about NW release is it really smarter to select SQL Script rather than MDX.
    There is another statement in [Re: BPC 7 NW; Deppak mentions that:
    - "In BPC 5.1 the script formula approach suggests to use SQL based logic instead of MDX.
    Whereas in Teched,08, I learnt that MDX & ABAP (using BADIs) would be used for it. Thats why I am slightly confused...."
    But second statement is far beyond NW relase date and I am sure this is not true but I would like you to confirm that.
    If you were a project responsible and want that all scripts will be held in one language, what would you choose??
    Thanks in advance,
    ergin ozturk

    Hi Ergin,
    I can understand your approach not to use ABAP hence you miss the skills witin your project team.
    However, you (or you client) has chosen the NetWeaver version for whatever reason. I'm sure a thorough decisions process has lead to this decision. In choosing the NetWeaver version with SAP BI you will sooner or later come to the point that you will have to use ABAP if you like it or not. Especially when you start using further capabilities within NetWeaver and the BI solutions. So from my point of view ABAP knowledge is an essential skill you need in a project based on SAP NetWeaver anyway.
    Additionally I heared some statements that MDX is causing some performance issues on the NetWeaver version. This may have been fixed in the meantime with some SPs.
    As the SQL within the NetWeaver verison does not have the full functionality than it has in MS Version SQL is not an option for me.
    I do also not see the cost impact hence someone need to do the support anyway. In case of MDX you need an MDX developer, in case of ABAP and ABAP developer. Or a technical BPC consultant able to do the development (which I would recommend you should have in your project team anyway).
    So coming back to your original question, I would recommend to do as much as possible using ABAP BADIs.
    Cheers,
    Steffen

  • Script logic : determine the content of a variable according to a IF test

    Hello experts,
    I have the following need in a script logic
    determine the content of a variable according to a IF test
    For example I tried :
    *WHEN %ENTITY%
    *IS "CH20","CH30","ES10"
    *SELECT(%ENTITYPBPD%, "[ID]", "ENTITYCC", "[ID] = '%ENTITYCC_SET%_PBPD'")
    *ENDWHEN
    Syntax is correct but I get a query execution error (Error in WHEN/ENDWHEN structure)
    I guess it's because this when don't have any REC instructions.
    In other words, if the user selection at the package prompt step are CH20, CH30 or ES10
    the variable has to be selection_PBPD
    if another member is selected
    the variable has to take other value
    Hope I've made my need clear, and thanks in advance.
    G.

    Hi G,
    Will the *TEST_WHEN() statement work for this case?
    The way that it works is that if the condition evaluates to TRUE, then the subsequent WHEN...ENDWHEN is processed, else it is not.
    Have a look at Page 66 of "How To Use BPC Scripting Logic, Version 1.00, April 21, 2006" (It's a bit old but I use it a lot on our MS7.0 SP9 installation).
    Hope this helps.
    Regards
    Nick

  • Reg: Script Logic - REC Statement Variable usage

    hi friends
    Pl find enclosed the following code:
    *WHEN TIME               
    *IS TMVL(-1,2011.04)               
    *WHEN ACCOUNT               
    *IS "EXP01"               
    *REC(EXPRESSION = [TIME].[2011.04]-%VALUE%,TIME = 2011.04,ACCOUNT = EXP01A)               
    *ENDWHEN               
    *ENDWHEN               
    The above code is working fine and result is extracted but i have hardcoded , ACCOUNT=EXP01A;
    My Query is follows:
    I have used
    *WHEN ACCOUNT               
    *IS "EXP01"
    In REC i want to use concatenation of "A" To account like EXP01&"A"
    i know accunt & i want to concatenate "A" and use in REC statement like assign to variable
    var1="EXP01" & "A" and use var1 in REC
    *REC(EXPRESSION = [TIME].[2011.04]-%VALUE%,TIME = 2011.04,ACCOUNT = var1)
    i am not sure the syntax (Whether we need to put in strings)
    Also if EXP02 then var1="EXP02"&"A" and so on
    In fact i want to make this for all members in Account Dimenstion as generalised.
    Pl. verify and suggest best possibility
    Thanx & Rgds
    Srinath

    Hi Krishna
    *XDIM_MEMBERSET ACCOUNT AS %ACC% = EXP01
    *WHEN ACCOUNT
    *IS %ACC%
    REC(EXPRESSION = %VALUE%2,TIME = 2011.04,ACCOUNT = %ACC%A)
    *ENDWHEN
    Is it required to add EXP01A as below?
    XDIM_MEMBERSET ACCOUNT AS %ACC% = EXP01, EXP01A
    Also In Generalized code you have mentioned:
    Instead of Hard Coding EXP01, EXP02 can i have hierarchy of all EXP , so that if any new account added in dimension, there will be no change in script logic. Pl. can you share how to use the same.
    If above code needs to be generalised, *FOR *NEXT can be used .
    *XDIM_MEMBERSET ACCOUNT AS %ACC_LIST% = EXP01,EXP02,EXP03,EXP04
    *FOR %ACC_MBR% = %ACC_LIST%
    *WHEN ACCOUNT
    *IS %ACC_MBR%
    REC(EXPRESSION = %VALUE%2,TIME = 2011.04,ACCOUNT = %ACC_MBR%A)
    *ENDWHEN
    *NEXT
    Rgds
    Srinath

  • Allocations with Script Logic

    Hi Experts,
    We're trying to run script logic for allocations, but aren't able to sum to values to one Costelement.
    In the Account dimension we have:
    - Costelements (CE)
    - Keyfigures (KF)
    - Prices (PR)
    What we want to do is:
    write (KF_A * PR_A) + (KF_B * PR_B) to CE_A
    Any suggestions on the right syntax would be very welcome.
    Regards,
    Vincent

    Hi,
        Can you explain me clearly so that i can give you solution.
    Regards,
    Naresh.K

  • Pull script logic

    Hi all,
    need some help on writing the script logic.
    Here's the condition:
    We have 2 applications (apps A with 10 dimension and apps B with 6 dimension)
    I'm trying to write a script logic that run at apps A referring data from apps B. Actually i've tried using *LOOKUP and *XDIM_GETINPUTSET syntax. When checking the debuglogic file, source values are doing fine but somehow I couldn't manage to write them into apps A due to dimension difference (i've tried using *DESTINATION_APP and *ADD_DIM, too).
    Thanks.

    Hi Nilanjan,
    Here's the script logic:
    *LOOKUP APP_B
    *DIM RPTCURRENCY="LC"
    *DIM DATASRC="INPUT"
    *DIM INTCO="NON_INTERCO"
    *DIM CATEGORY="BUDGET"
    *DIM SUBACCOUNT="NON_SUBACCOUNT"
    *DIM AAA:ACCOUNT="LCS"
    *ENDLOOKUP
    *XDIM_MEMBERSET ACCOUNT = LCS
    *XDIM_MEMBERSET TIME = 2010.JAN
    *DESTINATION_APP = APP_A
    *ADD_DIM= NON_DIM7,NON_DIM8,NON_DIM9,NON_DIM10
    *WHEN TIME
    *IS 2010.JAN
         *WHEN ACCOUNT
         *IS "LCS"
              *REC(EXPRESSION=LOOKUP(AAA),ACCOUNT="LCS",DIM7="NON_DIM7",DIM8="NON_DIM8",DIM9="NON_DIM9",DIM10="NON_DIM10")
         *ENDWHEN
    *ENDWHEN
    *COMMIT
    I add the *DESTINATION_APP and *ADD_DIM because when running the logic debugger without them it only shows "No record to process".
    I've managed to find the workaround using *RUNLOGIC now.
    Thanks again for your attention.

  • Error Script Logic FXTrans

    Hi All,
    Under script logic section under my application, I have maintain
    *RUN_STORED_PROCEDURE=SPRUNCONVERSION('%APP%','%CATEGORY_SET%','','GLOBAL','%SCOPETABLE%','%LOGTABLE%')
    and added below it the following
    *INCLUDE SYSTEM_CONSTANTS.LGL
    *INCLUDE SYSTEM_LIBRARY.LGL
    *SYSLIB MULTICURRENCYTRANS.LGF
    I receive the following error, " Application: FINANCE
    Logic file: FXTrans.LGF
    Validation status of executable file: Failed
    - missing file:D:\PC_MS\DATA\WebFolders\BSB\AdminApp\FINANCE\SYSTEM_LIBRARY.LGL
    Validation status of syntax: Failed
    - Invalid syntax found; see statements in red"
    The Red ones are
    - SYSTEM_LIBRARY.LGL
    - MULTICURRENCYTRANS.LGF
    Could anyone advise me how do go about on this
    Thanks
    Zan

    Hi,
    I'd like to clarify first that SPRUNCONVERNSION and MULTICURRENCYTRANS.LGL do the same thing using different methods. The first requires you to maintain appropriate business rule table called Currency Conversion and the latter is Script Logic-based functinality. Typically you do not need to maintain bot as SPRUNCONVERSION is pretty robust and should fulfil all your needs unless you have to do some truly exotic variation of the business calculation.
    So to conclude you probably only need the following in your script logic:
    *RUN_STORED_PROCEDURE=SPRUNCONVERSION('%APP%','%CATEGORY_SET%','','GLOBAL','%SCOPETABLE%','%LOGTABLE%')
    *COMMIT
    and also maintain rates in the rate application. Please refer to user guide section Business Rule Management for further details: [http://help.sap.com/saphelp_bpc75/helpdata/en/b1/f5839e6ba74a22aa4ce9470179c854/content.htm]
    In order to use script logic you will need to write the logic yourself or to use the one supplied with the system (in the SYSTEM_LIBRARY).
    The logic library is stored in the file on the server %APPSET%\System Library\Logic Library\SYSTEM_LIBRARY.LGL
    IN your script logic you need to include the library to use in your logic:
    *SYSLIB SYSTEM_LIBRARY.LGL (SYSLIB tells the system to look at the specific place in the appset folder and LGL is the extension for appset-level logic files)
    After this you need to call appropriate subprogram from that library and pass some parameters to it:
    RunFX(%APP%,%CATERGORY_SET%)
    *COMMIT
    for example.
    Hope this helps,
    Madis

Maybe you are looking for

  • IPhoto 9.2.1 update - no RAW files

    This problem is on my husband's MacBook Pro running 10.6.8.  Prior to the 9.2.1 update he had uploaded quite a few RAW (NEF) files from his Nikon D90 and they worked fine.  After the update, the thumbnails are there, but they cannot be opened to view

  • Updated to 6.0.1 can't save pictures now

    Upgraded to 6.0.1 and now when I have a pic on screen and I touch screen to get the "Save Image" prompt I touch it to "save" and it acts like it is but I never get the picture in photos or anywhere.  There are a couple of other features that have als

  • Analyze table after insert a large number of records?

    For performance purpose, is it a good practice to execute an 'analyze table' command after inserting a large number of a records into a table in Oracle 10g, if there is a complex query following the insert? For example: Insert into foo ...... //Inser

  • Change primary email address and telephone numbers

    change primary email address and telephone numbers

  • CUCM full configuration in text format

    Dear All, Can we pull out the CUCM full configuration in text format ? Actually one of My customer wants CUCM' confiuration in text format to check feasibility to add CUCM to "Device Expert" like switches, router etc. Below is the overview of Device