BPC Script Logic - XDIM_FILTER results in error

I am writing a Script Logic in BPC and I need it to include all records where the DESTINATION dimension member has the Dimension Property of PLANDEST = "Y"
This approach works:
*SELECT(%DestinationMbrs%,"[ID]","Destination","[PlanDest] = 'Y'")
*XDIM_MEMBERSET DESTINATION = %DestinationMbrs%
This approach does not work:
*XDIM_MEMBERSET DESTINATION = <ALL>
*XDIM_FILTER DESTINATION=[DESTINATION].PROPERTIES("PlanDest")="Y"
It results in the error message at runtime:
Error in step 1 of QueryCubeAndDebug: -2147467259 Query (1,156) The PLANDEST dimension attribute was not found.
The reason I would like to use the second approach is that the first approach relies on the SELECT statement.  The documentation on the SELECT statement says:
The *SELECT statement is executed at the time the logic is validated, and the expanded result is
written in the LGX file. This means that if the related dimension is modified, it may be necessary
to re-validate the rules.
So if I change the DESTINATION dimension members PLANDEST flags, I need to re-validate the script logic.  That is a maintenance nightmare and a problem waiting to happen.
How do I solve this so that the dimension attribute is evaluated at runtime, not at logic validation time?

As Yuan Said, if you are using MDX logic and want to use property, you should check Inapp at the 'manage property' menu of admin console.
Usually, InApp sholud not be selected for better performance of MDX query. (SAP recommendation)
But. Here are two cases that you should select.
1. MDX logic in the logic script.
2. Dimension formula.
I hope it will make clear for all.
James Lim

Similar Messages

  • Rounding in NW BPC Script Logic

    Hi,
    BPC MS version has a keyword "ROUND" to round the numbers through script logic.
    What is the replacement to Round the amounts in NW BPC Script Logic.
    I tried using the same keyword "Round" but it did not work. 
    Appreciate your help.
    Thanks
    Anjali

    There is a HowTo guide showing how to implement this functionality as a BADI - [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50daa919-5b80-2c10-babd-b75c6c64feed]
    Please make sure to search SCN and look through the HowTo guides before asking questions in the forums. HowTo guides can be found here: [http://wiki.sdn.sap.com/wiki/display/BPX/EnterprisePerformanceManagement(EPM)How-to+Guides]
    Ethan

  • Script Logic wrong results in migration to BPC 7.5M

    Hi Experts,
    We have an issue with Script Logic calculation after migration of BPC 7.0M to BPC 7.5M. At the beginning we thought that was the issue mentioned in SAP note 1515973, because we had SP03.
    Now we have SP07 and the problems persist. The result of a simply product between two numbers is wrong. For example in the next Default Script Logic:
    *WHEN TIME.GROUP
       *IS INPUT
    *WHEN CATEGORY
         *IS  <> "ACTUAL","B_ACTUAL"
              *WHEN ACCOUNTP             
                    *IS "M_SALES"
                        *REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_BASIC"),ACCOUNTP="700200")
                        *REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_PROMO"),ACCOUNTP="700230")
                        *REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_LIMITED"),ACCOUNTP="700235")             
              *ENDWHEN
      *ENDWHEN
    *ENDWHEN
    *COMMIT
    Input:      M_SALES =           -195,75933
    Input:      PRCT_SALES_BASIC =      1
    Result: 700200 =           -195
    Are there some application parameter that defins de presicion of logic calculations?
    Some ideas? Thanks in advance.
    Best Regards
    Albert

    Hi Jörg,
    We changed to a new server with a multi-server architecture 64 bit (BPC Server and DB Server).
    Did you have the same problem? How do you resolve it?
    Thanks in advance.
    Best regards,
    Albert

  • BPC Script Logic Multi-dimension REC Statement

    Hi All BPC Experts,
    The way that our data in the dimensions is setup, members in one dimension have properties that "point" to members in other dimensions.
    In this case when I write the REC statement, whilst I'm just doing arithmetic on P_ACCT, when I write the final value, I also need to specifiy the members for the dimensions CUSTOMER, ENTITY, MINE, DESTINATION.
    In the example below I hve hardcoded the CONTRACT and TIME dimension members, but going forward, this logic will be appllied to a number of CONTRACTS and TIMES so the members of the other dimensions need to be retrieved dynamically.
    *XDIM_MEMBERSET P_ACCT = CAPACITY_REV,CAPACITY_RATE,FINAL_VOLUME
    *XDIM_MEMBERSET CATEGORY=FORECAST
    *XDIM_MEMBERSET P_DATASRC=Input
    *XDIM_MEMBERSET CONTRACT=0005000001_10
    *XDIM_MEMBERSET TIME=2009.JUL
    *WHEN P_ACCT
          *IS CAPACITY_RATE
             *BEGIN
                REC(EXPRESSION=(%VALUE%[P_ACCT].[FINAL_VOLUME]),
                         CUSTOMER = CONTRACT.CUSTOMER,
                         DESTINATION = CONTRACT.DESTINATION_ID,
                         ENTITY = CONTRACT.HAUL_PC,
                         MINE = CONTRACT.MINE_ID,
                         P_ACCT = "CAPACITY_REV")
             *END
    *ENDWHEN
    *COMMIT
    My Question is twofold:
    - Can anyone see any problems with the above code, ie is this a valid way of writing the REC statement?
    - Can anyone suggest another way of writing this code?
    Best regards
    Mark Rodrigues

    Just repostoing the logic as "Code"
    *XDIM_MEMBERSET P_ACCT = CAPACITY_REV,CAPACITY_RATE,FINAL_VOLUME
    *XDIM_MEMBERSET CATEGORY=FORECAST
    *XDIM_MEMBERSET P_DATASRC=Input
    *XDIM_MEMBERSET CONTRACT=0005000001_10
    *XDIM_MEMBERSET TIME=2009.JUL
    *WHEN P_ACCT
      *IS CAPACITY_RATE
        *BEGIN
            REC(EXPRESSION=(%VALUE%P_ACCT.FINAL_VOLUME),
                                            CUSTOMER = CONTRACT.CUSTOMER,
                                            DESTINATION = CONTRACT.DESTINATION_ID,
                                            ENTITY = CONTRACT.HAUL_PC,
                                            MINE = CONTRACT.MINE_ID,
                                            P_ACCT = "CAPACITY_REV")
        *END
      *ENDWHEN
    *COMMIT

  • BPC Script logic : WHEN condition on two members of the same dimension

    Hello experts,
    my particular need is the following one ; I have to write an initialization logic for a planning application but I have to match 2 conditions to perform the initialization :
    (dimensions are PERIOD / RATIO and few other not interesting here)
    - SIGNEDDATA for member IB007 from dimension RATIO has to be not null
    - member IB009 (which is the the member I wish to initialize) has to be empty
    I have written the following code, but it always overwrite IB009 value :
    *WHEN PERIOD.LEVEL
    *IS "WEEK"
        *WHEN PERIOD
        *IS <> "Week.NA"
            *WHEN RATIO
            *IS "IB007"
    *REC(RATIO="IB009",NOADD,EXPRESSION=GET(RATIO="IB009",PERIOD="Week.NA",CAMPAIN="CA_000",SALES_BRANCH="CV_000",CONTRACT="CO_000",INTERCOS="I_NA",OFFER="O_000",RPTCURRENCY="LC",VERSION="Vers1")
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    In the GET instruction I fetch a data stored into a particular dimension cross as a  default value.
    I can't figure out how to perform a double test not to overwrte IB009 when a value already exists.
    Edit : in the second WHEN of the code part, it is     *IS different of "Week.NA" but the inferior superior sign does not appear because of the "code" markup I guess
    Thanks in advance for help, points will be awarded.

    I solved the issue on my side.
    It is possible tu use a GET in the WHEN
    *WHEN GET(RATIO=IB009)
    *IS 0
    I close.

  • Send parameter from one script logic to another. SAP BPC 7.5 NW.

    Hello!
    Before i start, want to apologize for my English.
    We work on SAP BPC 7.5 for NetWeaver.
    In general,  we want to send parameter from one Script logic file to another script logic file.
    I will explain why :
    1. We have parametr like %C_CATEGORY_SET% (and another four parameter, like groups, currency and etc.) that work on one script(next, i will named it A_Script). 
           We will send this parametr from BPC EXCEL (we will create button, then use command MNU_eData_SelectPackage(we also set parameters) and run package that we need, also before we set script for this package by the SAP Guide. We send some data, and this A_Script work good. Everything that we want from this script work correctly. )
    2. Next we create another script(B_Script) , and we want use %C_CATEGORY_SET%, but we don't know how use this parametr, if we will just write this parametr on Script Logic,  apears error ("C_CATEGORYDATAVALUE" is not assigned to the Data Administrator). We try to solve this problem by using System_Constants.lgf, but we get error.
    Code:
    *DIM C_CATEGORY          WHAT=%C_CATEGORY_SET%;             WHERE=<<<;                   USING=<<<;    TOTAL=<<<
    *DIM C_ENTITY                 WHAT=%ENTITYSET%;                         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM GROUPS                   WHAT=%GROUPS_SET%;                    WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    *DIM RPTCURRENCY         WHAT=%RPTCURRENCY_SET%;         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM TIME                          WHAT=%TIME_SET%;                          WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    If we will change %C_CATEGORY_SET% for  ACTUAL, and also change another parameters, script will work, package will run correctly. But we need using parameters, because we didn't exactly what will choose our client.
    Our question have BPC Script Logic some kind of Globar Parameter(Variable), that we will set in A_Script, and then use them on B_Script?
    How can we define parameter from another script logic, maybe we should send it?
    Should we use System_Constants for solving this problem, if yes, how?
    Any help will be appreciated
    Best Regards,
    Erlan Kadraliev
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:50 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:58 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:59 PM

    Hi Ethan Jewett 
    1. About %ENTITYSET% it is normal. Before this line  i write :
    *SELECT(%ENTITYSET%, "ENTITY", GROUPS, "[ID]=%GROUPS_SET%")
    So it is not this problem. %ENTITYSET% just parameter, that i used.
    2. Are you running the scripts using the same data manager package? I am running two different package for 2 different Script.
    For example aPackage for aScript, and bPackage for bScript.
    My questions was how can i send parametr from one script to another, for example i can run another script by using BADi command Runlogic, but how can send parameter that i need to used on another script. I have for example parameter %GROUPS_SET% (CG001) on aScript, but i can't get this parameter on another script, if i write %GROUPS_SET% i will get error  ("GROUPSDATAVALUE" is not assigned to the Data Administrator)
    OR
    Maybe if you will answer for next question, i will be able solve problem , How can i send parameter CG001 (this is %GROUPS_SET%, for example it stay in EXCEL in cell A5) from excel to script logic by running package. Maybe i can get cell value on Dynamic Script Data Management?  
    My Dynamic Script on bPackage
    PROMPT(RADIOBUTTON,%CHECKLCK%,"u0412u044Bu0431u043Eu0440 u0431u0430u0437u043Eu0432u043Eu0433u043E u043Fu043Eu043Au0430u0437u0430u0442u0435u043Bu044F.",1,{"u0412u0441u0435u0433u043E u0410u043Au0442u0438u0432u044B","u0421u043Eu0431u0441u0442u0432u0435u043Du043Du044Bu0439 u043Au0430u043Fu0438u0442u0430u043B","u0412u044Bu0440u0443u0447u043Au0430 u043Eu0442 u0440u0435u0430u043Bu0438u0437u0430u0446u0438u0438","u0414u043Eu0445u043Eu0434 u0434u043E u043Du0430u043Bu043Eu0433u043Eu0431u043Bu0430u0436u0435u043Du0438u044F u043Eu0442 u043Fu0440u043Eu0434u043Eu043Bu0436u0430u044Eu0449u0435u0439 u0434u0435u044Fu0442u0435u043Bu044Cu043Du043Eu0441u0442u0438"},{"BPAST_ALL","BPEQ","BPPROCE","BPOPIN_GO"})
    INFO
    (%EQU%,=)
    INFO
    (%TAB%,;)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,CHECKLCK%EQU%%CHECKLCK%%TAB%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,MYTEST_145.LGF)
    Best Regards,
    Kadraliev Erlan

  • Raise an ERROR message from Script logic

    Hi All
    Here i have developed a custom copy funtion im not using standard copy functionality.
    I am trying to copy from working version to another version ex: V01 to V02. I have scoped these two versoins in script logic.
    But when user runs DM package for a different version other than v01 and v02 then user has to get the error message.
    Can i achive this by including some code in the script logic. i dont want to use the security options on user level.
    is there any function to raise error??
    Please suggest thanks in advance.
    Regards
    AK

    Hi AK,
    As I understood from your question, you want to copy always from V01 to V02. No other versions will be used other than these 2. So, it will be better to have them hardcoded in your script logic, instead of keeping error messages for the user. Anyways, you dont want the user to enter anything other than V01 and V02.
    Hope this helps.

  • BPC 7.0 MS Script-Logic problem: New values used, old values written?

    I am trying to using BPC Script logic to update my Sales cube, specifically Revenue=Units*Price and Price=Revenue/Units using the "Price" stored in a seperate Price cube.
    Inside default.lgl, I am *INCLUDE-ing my own script:
    *LOOKUP PRICES
    *DIM PREIS:ACCOUNT="Price"
    *ENDLOOKUP
    *WHEN ACCOUNT
    *IS "Units"
    *REC(FACTOR=LOOKUP(PREIS),ACCOUNT="Revenue")
    *IS "Revenue"
    *REC(EXPRESSION=%VALUE%/LOOKUP(PREIS),ACCOUNT="Units")
    *ENDWHEN
    *COMMIT
    Now, when I insert new "Units" values using the std. Excel template, strange things happen:
    - The Revenues seems to be computed and updated correctly in the cube (if I check them using excel templates, they show up).
    - The Units seem to have the values they had before... seems they get old values ?!
    E.g. if I have several write operations say, I write units=2,3,4 and price is constant 10,
    the values in the cube seem to be (table):
    value written, units in cube, revenue
    3 , 2 , 30
    4,  3 , 40
    The new value is somewhere in the MS Analysis cube, otherwise, how could later be the new value be shown, although the excel templates seem to show old values?
    Any explanation for that strange behaviour?

    I simplified and wrote the prices in the same cube as I send the data from with the excel template.
    I tried using:
    *WHEN ACCOUNT
    *IS "Units"
    [Account].[#Revenue]=[Account].[Units]*[Account].[Price]
    *ENDWHEN
    *COMMIT
    *WHEN ACCOUNT
    *IS "Revenue"
    [Account].[#Units]=[Account].[Revenue]/[Account].[Price]
    *ENDWHEN
    *COMMIT
    Now, if units are send from the excel template, revenue is calculated correctly.
    If I enter revenue instead, seems that the 1st block is executed as well (why????!!!/how to avoid - I use *WHEN - what else should I do? )  which would explain the behaviour I get the old values for Units and Account again...
    Related: How can I use "*WRITE_TO_FILE"? I tried both
    *WRITE_TO_FILE Mylog.txt
    *WRITE_TO_FILE "Mylog.txt"
    But I can't find these file after sending data through the excel template... Do I have to create the files manually first or give full Path Names?
    Thanks!

  • SAP Bpc: automate script logic validation

    Is there a way to automate the validation of the SAP BPC script logics?
    I ask you that because I have daily SSIS packages and, actually, if I don't manually vaildate the logics every time, using SAP BPC administration interface, the new members are not cosidered into the application.
    I tryed the BPC SSIS "Adimin Task" (using Validate Logic mode) but it only checks if the syntax of the logic is correct or not.

    Thanx for the replay but, unfortunatly, I think it's not useful for my case.
    I use SSIS packages to populate dimensions (such as Employees). In these packages I have BPC Admin Task (in create dimension mode) and it works fine.
    The problem is > if I don't go into SAP BPC Administration Console to "Validate and Save" the script logics manually > inside the .lgx file there aren't into XDIM_MEMBERSET the new data I previously imported throught the SSIS packages above (in the exemple the new Employees).
    Beeing not into the XDIM_MEMBERSET, the script logic executed by the users excel input schedules cannot manage the new set of data... until I "Validate and Save" the logic manually.
    Edited by: Francesco Andolfi on May 26, 2010 4:22 PM
    Edited by: Francesco Andolfi on May 26, 2010 4:22 PM

  • Getting an error message while running FX script logic

    We are getting the following error message, while running the FX script logic - RUN_LOGIC:MDX statement error:"Value (Entity value) for characteristic /CPMB/U8D5FIT".  Any help is truly appreciated.  We are using the standard FX logic scrip *RUN_PROGRAM CURR_CONVERSION

    Hi,
    Hope all the required currency configuration settings are followed in Entity, Input currency, Category, Account correctly. Also reporting currency indicates the right reporting currency with the 'Reporting' propert set to 'Y' to the currency that you want to report in.
    For the period that you are running the currency trans, could you also maintain rates for the reporting currency as 1.
    Check your rate data. And please post your currency conversion script here.
    Thanks,
    Sreeni

  • BPC 7.5NW SP08: "unknown MDX error" message for simple dimension formula

    Hi everyone!!
    We are facing many different issues concerning dimension formulas and
    script logic. Maybe it's something related to SP08. For instance,
    consider the following:
    - there is a dimension named P_Account, with members Price, SalesCost,
    and others
    - there is a dimension named P_Product, which consists of a hierarchy,
    for instance: Prod1 with two children, Prod1A and Prod1B
    We want to set the following dimension formula in P_Product for Prod1 member:
    IIF([P_Account].CURRENTMEMBER.PROPERTIES("ID") = "Price", Null, 1)
    that is, we wanted to try to be able to avoid summing Price, returning
    Null for (Price, Prod1). Later we would try to replace "1" with the
    appropriate formula to sum children of Prod1 for all other members of
    P_Account. The result is an odd error: "MDX statement error: unknown MDX
    error" (or something similar, since I get the error message in portuguese).
    We have spent almost two days studying alternatives in SDN Forum, blogs,
    google, etc, trying to find a reason for the error but couldn't find it.
    Could anyone help on this one?
    Thanks!
    Luigi

    Hi everyone!
    After contacting SAP, we were asked to try to reproduce the error in APSHELL. I did the following:
    1) created another application set, copying APSHELL, named it TESTAPPSET;
    2) added two members to dimension P_ACCT (ID, ACCTYPE, SCALING, RATETYPE):
       (PRICE, INC, Y, END)
       (SALESCOST, INC, Y, END)
    3) saved to server and processed P_ACCT dimension successfuly
    4) added a UD dimension copied from P_Activity, named P_Product
    5) deleted all members of P_Product, processed the dimension sucessfuly
    6) added FORMULA property to P_Product, with size 200
    7) added three members to P_Product (ID, PARENTH1)
       (Prod1, "")
       (Prod1A, Prod1)
       (Prod1B, Prod1)
    8) saved to server and processed the dimension successfuly
    9) edited P_Product members and added the following as FORMULA for Prod1:
    IIF([P_ACCT].CURRENTMEMBER.PROPERTIES("ID") = "PRICE", Null, 1)
    Result was sucess!!
    10) edit P_Product again and removed the formula, saved to server and processed dimension successfuly;
    11) created an Application named SALES, type Financial Report, copied from PLANNING with dimensions
    12) edit dimensions, removed P_Activity and added P_Product to the list
    13) went back to step (9) and tried to add the formula again, saved to server and processed P_Product dimension. Result was success again!!
    So I imagined the issue might be caused by the user I was log in with. I went back to our application set, logged in as BPC_SYSADMIN and tried to set the formula again and it didn't work. User was not the problem.
    Since I had tried all the above creating everything with all UPPERCASE, I decided to try the following Formula
    IIF([P_ACCOUNT].CURRENTMEMBER.PROPERTIES("ID") = "Price", Null, 1)
    that is, P_ACCOUNT instead of P_Account. Result: success in processing dimension!!! And the formula worked as expected when I opened an Input Schedule to test it.
    When I check my dimension list in BPC Admin it says P_Account (mixed case), instead of P_ACCOUNT (all uppercase) since it was the way we created it.
    So, I spent 1hour to do the whole test, but it worked. I sent two questions/requests for correction or improvement to SAP:
    I) which case should be used in formulas? given I see P_Account in Dimension list, how should I know that I should write formulas with P_ACCOUNT, all uppercase?
    II) could BPC provide more descriptive error messages when processing dimensions and validating script logic? a simple error message such as "unidentified command or reference at P_Account" or anything similar would have saved us 4,5 days of work! it's a lot!
    Thank you guys for your support!!

  • BPC - Script - How to get the month of a date stored as an amount?

    We have a account called "StartDate" in our database.
    The user enter a date for this account: 01/07/2010
    This date is then stored as 40360 in the db
    We are trying to get the month number (7) out of this record.
    We succeeded to write an sql query to do that:
    Select Month( cast( as datetime ) )
    From tblFact
    Where = 'StartDate'
    Any idea how to do that in a bpc script logic ?
    Thanks,
    Bénédicte

    There's no built-in support for any type of date math in BPC script logic.
    One approach I've used is to add a property to the time dimension, ExcelTimeID. Then you can compare the value to your time periods, if your logic requires this type of condition.
    *WHEN SignedData
    *IS < Time.ExcelTimeID
    But that doesn't solve the problem you have, where you want to know the month. I can't think of an immediate solution, other than perhaps in the original input schedule to hide a second account that submits the month number (as an integer) along with the account you have now (with the full date).
    Or stick a stored proc in some logic package, scheduled to run every 10 minutes or whatever, that takes the account with the date in it, and runs your query, saving the result as the month number. Ugly in so many different ways, but it's another way to tackle the problem further upstream.
    And last result is to build script logic with ridiculous hard-coding of Excel time IDs all over the place.

  • 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

  • Variable in  script logic

    Follow is the script code from previous post
    *XDIM_MEMBERSET ACCOUNT = ACC1
    *FOR %My_Var% = %ENTITY_DIM%
    *WHEN ENTITY
    *IS *
    *REC(EXPRESSION = (GET (ENTITY = %My_Var%.PROP1)), ENTITY = %My_Var%)
    *ENDWHEN
    *NEXT
    I understand that  both %My_Var% and %ENTITY_DIM% are variables, my question is how %My_Var% and %ENTITY_DIM% get the value during the process of the code, do we neeed to define the variable some where else before we use them? I remeber in FOX, we need to define the variable before we can use it.
    also is there a difference if I use $My_Var$ to replace %My_Var%?

    nilanjan,
    Thanks for the explanation,I have another question regarding to the variables.
    I need to get the YTD salary. in BPS the pseudocode code is as following:
    data YTD_salary type amount
    loop at each_month,
       YTD-Salary =  YTD-Salary  + current_month.
       if the  YTD-Salary  > FICA CAP.
       exit.
    Endloop
    How can we archive the same in BPC script logic with a variable to capture the YTD-Salary and pass it to next month?

  • 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

Maybe you are looking for

  • PDF document protection

    When exporting a pages doc to PDF for emailing, can it be protected from editing by recipients -as in a newsletter?

  • Invisible ads on pages, whenever I click they will redirect me in a new tab or window. How do I fix this?

    OK so I use Firefox for a lot of things. I have been having a major problem with ads recently. They have been completely invisible, covering nearly the entire page, and opening up obvious adware (I.E. Telling me to update browser, flash player, etc.)

  • Getting Error while installing UCM

    Hi All, Am getting error while installing the UCM in my system. Error description:- NOTICE:     Install logging initialized at 2/5/10 3:34 PM. NOTICE:     Installing master server. NOTICE:     Installing with Java version 1.5.0_11. NOTICE:     Instal

  • Usb connection not working for itouch

    I have a 1st generation iTouch and when connecting to my laptop via usb, it does not show in iTunes.  Have worked through the online support steps and they did not remedy the issue.  Even downloaded the lates version of iTunes.

  • Macbookpro freezes when i enter password at login screen

    Over the weekend I had an issue with Security Update 003 and Adobe Version Cue CS2. That got resolved and I no longer had any startup issues, but now I have them again, only they are a little different. My computer froze while converting a Photoshop