BW 3.5 - Issue with formula variable with replacement path

Dear experts,
I'm facing an issue with formula variable with replacement path.
Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
To do so I've setup a calculated key figure as follow:
VAR1 * ("PO value" < 100 ) * "PO value"
VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
(The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
The report as characteristic "plant" in rows and my CKF in columns.
Now let's take an example. I have 3 POs in Plant 1:
PO1 -> 150€
PO2 -> 90€
PO3 -> 80€
Because of the variable with replacement path, the result in my query should be:
plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
But the result coming is 320, which is wrong.
I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
Any though is welcome!
thanks

Hi,
The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
Regards,
Patricia

Similar Messages

  • Formula variable using Replacement path not working

    Dear All,
    I am using a query to calculate YTD values in the report. I am using a formula variable to calculate the number of months. Formula is
    Month To - Month From+1
    When I am giving the range from 001 to 006 for period in th evariable screen,
    I am gettung Month To as 6 and Month From as 6 with total no . of months as 1.
    I think Month From is not being caculated properly. I created another formul variable using Replacement path, for characteristic Posting period, replace with a Key and dimension ID as number with out any offset.
    Still not working.
    Any suggestions.
    Thanks and Regards,
    Srini
    Edited by: Srinivas on Apr 24, 2008 11:13 AM

    Hello,
    I have seen this document already. It is slightly different from what I am trying to do here than what the post shows. How ever,  I did everything right, atleast seems to be and don´t know why I am not getting the From value from the posting period selected. To value variable is coming right.
    Any more sugegstions.?
    Thanks and Regards,
    Srini

  • Create a formula variable using replacement path for current date

    Hi All,
    I created a formula variable using replacement path for current date.
    But when i used this variable am getting an error message saying .
    " This Variable cannot be used in this query".
    Could you please let me know the reason?
    Thanks,
    Zehra

    Hi All,
    Thanks for all your help...
    I just found a solution via the below link
    in Bex Formula variabel, Current calander day(sap exit) missing.
    Here he is trying to use the existing formula variable.
    My doubt here is, Even i could not find this varaible in BEX formula variable, But could see this in BI Content path as mentioned in the above link.  DO i have to transport this varaible , or i simply can activate it in production?
    I just could find this in BI Content but not in MetaData Repository.
    Thanks,
    Zehra

  • Issue with text variable by replacement path

    Hello All
    I have a date field called ZDATE1 (it is based on 0DATE). I have used this this IO in a query and have create variables on it (ZSTARTDT and ZENDDT), Start and End date. And my KFs are based on these 2 dates: Quantity - Start Date & Quantity - End Date  / Product Value - Start Date & Product Value - End Date. Those are my descriptions for my KFs.
    Now, I want the replace the descriptions "Start Date and End Date" with the actual values that I am entering like 09/01/2010 and 09/10/2010. Ex: Quantity - 9/01/2010 & Quantity - 9/10/2010.
    Therefore, I create 2 Text Variables,
         1. ZSTART, Replacement Path, Ref Char (ZDATE1), Replace by Variable ZSTARTDT, with KEY, offset - blank
         2. ZEND, Replacement Path, Ref Char (ZDATE1), Replace by Variable ZENDDT,      with KEY, offset - blank
    And I put these text variables in the descriptions. But when I run the query, I still see: Quantity - &ZSTART& and Quantity - &ZEND&.
    Note that my ZDATE1 which is based on 0DATE does not have a master data table or text table; it is purely transaction data. Does that mean, my text replacement path variables wont work.
    Any suggestions??

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • Formula variable in replacement path is showing N/A

    Hi,
    I have a DATE characteristic which I want to add as key figure in my query.
    I created replacement path formula variable for it but I can only see N/A in the report.
    I  checked the cube and there is data for the date characteristics.
    any idea how I can resolve this.
    thanks

    Hi,
    I understand, I said just check that...have you checked, this works or not?
    you can go to display properties of that charcteristic and say hide.
    If this works then u can hide it and keep it in query...
    Regards,
    Ashish

  • Problem with formula variable

    HI,
    I am facing problem with formula variable with replacement path. my requirement is system date - posting date.
    here i created 2 formula variable one is system date. second formula vaiable with replacement path is posting date. second formula vaiable not populating data. please help on that.
    regards,
    kris

    Hi,
    here is some idea.. here i have taken expample dates 1)notification creation date and 2) notification completion.
    1st:in the query designer at key figure coloumn create
    one local formula.in that local formula create formula
    variable with replacement path.in that take reference character
    notification completion.in the next tab take replace ment
    as key.in the last tab select "date".
    2nd: do the same thing for the notification creation date.
    3 rd : create 3 rd local formula and do the substraction
    for the first 2 local formulas.
    4th:create codition on the difference which u have find with
    on that condition u can create one user entry varibale.
    5th:while u defining the query put these 2 dates,i,e
    notification completion, notification creation date in the character block.
    If not system will ignore the formula variable which u created in
    above steps.
    Hope this wil help u.
    regards....KP

  • Formula Variable with User Entry

    Hi,
    I'm  confused with Formula Variable with Replacement Path and Formula Variable with User Entry.
    PLz, Explain with an example .....In which senarios  Formula Variable with Replacement Path is used and In which senarios Formula Variable with User Entry is used.

    Hi,
    Suppose you have some key figure sales.
    Now in the report you want to display 10% of sales or may be 20% of sales based on the user input.
    In this case you will define formula variable with user input. Because here percentage will be varying based on user input.
    And suppose you have a key figure price which is attribute of material and you want to use that price for calculation in the report. In this case you will define formula varible with replacement path.
    Let me know if you need more information.
    Regards,
    Mansi

  • BEX 7.0: Formula variable with replacement path not working after BW Upg

    Hi all,
    We have a formula variable using replacement path for 0MATERIAL characteristic that is used in a calculated key figure, in order to perform conversion factor to change measure units (0MATERIAL attribute).
    This was working pretty well until an upgrade from 3.5 to 7.0 EHP 1. The list that is displayed contains all key figures empty instead of the desired values.
    Can anyone suggest what could be the possible reason for this?
    Thanks in advance.
    CCS

    Hi all,
    Problem solved!
    The solution was based on the u201Chow to...Report Data in alternate units of measureu201D document (for 3x version) . http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b7b2aa90-0201-0010-a480-a755eeb82b6f?quicklink=index&overridelayout=true
    Basically, the upgrade has override the previous changes made in the program LRRSVF20, like the "How to" document refers. Namely, the reference to YBW_AUNIT_ENHANCEMENT program.
    We have carried out the changes and, apparently, the query is now working fine.
    Thanks.
    Best Regards,
    Cátia Coelho Silva

  • Issue - Formula Variable with Replacement Path

    Hi,
    Is it mandatory to include the base characteristics in the rows on which the formula variable(replacement path) is based on. As long as the base char is in the rows the variable works fine. The moment I take that off, the variable doesn't produce any result. I know the char can be put in the rows and can be hidden, but then in that case I don't get the desired aggregation level.
    Has anybody come across this probelm and managed to sort this out? Kindly suggest any solution.
    Thanks,
    Anurag.

    Hi,
    a formula variable with replacement path only works if the replacement object is in the query in either the rows or colums. The data can never be aggregated on a higher level then the infoObject in the replacement path. If you want a higher aggregation you can add a new key figure as an attribute to your infoObject and fill it with the value you want in the loading process. You can use that key figure in your queries every way you want.
    Kind regards,
    Alex

  • BEx Analyzer: Formula Variable with Replacement path change Month with Day

    Hi experts I'm facing this issue in BEx Analyzer.
    I need to have some dates in format DD/MM/YYYY in Index Structure, in order to do this I've created a formula variable with replacement path referenced to 0CALDAY characteristic.
    The formula works but it behaves in a strange way:
    if the day is higher than 12 the displaied result is correct (DD/MM/YYYY)
    if the day is lower or equal 12 the displaied result is wrong (MM/DD/YYYY)
    I'm on BW 7.01 SP6 and BEx Analyzer 7.10 SP12, excel 2007.
    anybody has faced this issue before?
    any help will be appreciated
    Daniele Cortopassi

    Hi Daniele,
    This seems pretty strange. Pls. redo validation with the dump data, as being a flat struture BEx does not apply any logic changes. May be it might have been MM/DD/YYYY format as in workbooks. Else you may change the property of 0calday display as "Text". Business Explorer > Display > KeyMaster Data/Texts > Texts (Plese check this option). If you are using some text table you may maintain the same using BI0/TCALDAY (Similar to BI0/TCALMONTH2). Guess it should be an excel based issue; if not you may try the same in WAD/Report designer to verify the nature of the issue. If you don't face these inconsistencies in WAD/RD then you may change excel formatting options. Lastly, please let us know if the infoobject has some predefined settings in RSA1 > Infoobject > (BEx) Properites.
    Thanks,
    Arun Bala

  • Zero Suppression Not working in Bex Query with Formula Variable

    Hi Friends,
    I have a peculiar issue here. We upgraded from 3.5 to 7.0 recently. Some of our Bex queries have been behaving abnormally after this. In these queeries,
    we have some key figures which use formula variables (ready for input and mandatory) in 3.5. User can enter either 1 or 0. The actual key figure is multiplied to the formula variable so, the entire column gets the actual key figure value if the user enters a value '1' and the gets the value 0 if the user enters '0' in the formula variables. Zero suppression is activated on the rows and columns and this report. This technique was used successfully to show/hide a column.
    After upgrade, the same query works but, the zero suppression is not working. When the user enters a value of '0' in these formula variables, all the entries in the column for the key figure are displayed as 0 but the column is still displayed. It is like the zero suppression setting is not active at all.
    I created one of those queries in Bex 7.0 to see if that works but, the issue still exits. Have anyone come across this kind of a scenario? Please get back to me if anyone has any idea on this situation.
    Thanks and Regards
    Subray Hegde

    Which SP level are you at in BI 7? There is an OSS Note that would need to be applied if you're on lower than SP10. That note is:
    [OSS Note 964756 - Formula variables with replacement from difference in BI 7.0|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=964756]

  • Formula variable with User Exit

    Hi,
    Can we create a Formula Variable of processing type USER EXIT...which will display a constant Value Y
    Any syntax would be helpful
    Thanks

    Hi,
    check this for formula variables with user exits;
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw/customer-exit-to-derive-formula-variable-to-text-variable-sap-bw-35-3030684
    Also Check the issues and solution :
    Formula Variable with User Exit....Problem
    Thanks
    Hemav

  • Formula variables with replacement from key

    Hi Sdns,
    Well We are doing Upgradation from BW3.5 to BI 7.0.. After Upgrade we got stuck up'd at reports.. We are facing an error for a report which is formula variables with replacement from key is not working. The final result is giving us unexpected results i.e, Itz showing the values as X.
    We got some reference from Service.sap. We found a note which is 1005772. Howeer this Note is applicable for suport package level 12. But we are already in higher suppor package level 15.. So this note is not applicable.
    Can anyone guide us if u people have faced this kind of issue.
    Regards,
    Aluri

    Hi,
    Replacemet path processing type can be used with Charceteristics variables, text variables and formula variables.
    For example u have created two restricted Key figues for two
    years sales comparison and u have used characteristics variables on 0CALYEAR.
    The years for which we want to compare sales volume will be selected during the Execution.
    If 2000 and 2001 be selected,
    these can be assigned as text for restricted Key figures in the record.
    Please go thorough the following links.
    An application of Replacement path variable can be found here.
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Another application to get the Document Count: For example Number of Sales Orders.
    Query formula-Counter???
    Example for Replacement Path: Characteristic Variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
    Variable Replacement Example
    http://help.sap.com/saphelp_nw04/helpdata/en/af/809528939d5b4fbff7e16a5bdc0d85/content.htm
    Example for Replacement Path: Formula Variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/5f9ac61a205a459d0e7ef313d10321/content.htm
    Hope it's helpful......
    Thanks,
    Kameswari.

  • Help with formula variable that will give me period #

    column A = $  for fiscal year period  variable  (using 0RMA_FIP,  SAP delivered variable for period)
    Column B = $ for fiscal year period  variable minus 1  (previous period)
    In Column C,  if fiscal year period entered in 0RMA_FIP was 001/YYYY  (january)  I want column C to be zero,  if not,  it will be a variance between column A & Column B.
    I think know how to do boolean logic:  (FV_Period == 1) *0 + (Column B % Column A)
    What i am having trouble with is creating FV_Period  as a replacement path formula varialbe so that it will contain the value of the period,   1 for January,  or 2 thru 12 for other months..

    While creating the Formula variable with replacement type, you need to mention the offset start and offset length.
    I believe if your Fiscal Period is displayed as 2010009 then
    offset start = 5 and offset length = 3 should give you the value 009 which is required.

  • Formula variable with replacement path

    HI ,
    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Thanks in Advance.
    Thanks
    Rajesh

    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    Yes. use I_step=1
    I_STEP = 1
    Call takes place directly before variable entry. Can be used to pre populate selection variables
    I_STEP = 2
    Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1.
    I_STEP = 3 In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Yes you can use both the variable of time char to restrict a characteristic but that should not be used on single characteristic.
    You can use the sys defined  0date on one field and the customised one Zsydatum on other char.
    Regards
    KP

Maybe you are looking for