Restricting a KF qty by a formula variable!

Hello experts,
                   I have a KF -> qty... i have created qty restricted by a date called "date of last movement". 
I need to restrict the same KF qty by today's date.
I have a formula variable which will produce today's date.
how do i restrict the KF qty by this formula variable?

Hi Nimish,
You can restrict qty by 0CALDAY as Danny explained. But this KF will always give qty for current date then why do you need restriction by "date of last movement"?
Bhargava

Similar Messages

  • Formula Variable to find Standard Price on Different Plant

    Hello Experts,
    I'm attempting to write a query against our Inventory cube.  I need to show:
    Inventory        Value of     Standard     Value of       Stock 
    Qty               Stock @      Price @      Stock @     Value
    @ Plant X      Plant X        Plant Y       Plant Y       Difference
    Value of Stock @ Plant Y = Inventory Qty at Plant X * Standard Plant at Plant Y
    Stock Value Difference = Value of Stock @ Plant X - Value of Stock @ Plant Y
    Plants X & Y need to be input by the user.
    My issue is determining the Standard Price at Plant Y.  0PLANT in the cube is tied to the inventory transaction.  Not all materials have inventory in both plants.  I've tried using a combination of Replacement Formula Variable (for standard price) and Restricted Key Figures but this only shows the standard price for those materials who have inventory at Plant Y.  Ideally if I could have a Replacement Path Formula Variable that allows restriction by a Plant (again user input).. that might work.  I don't see how to do this.  If that isn't possible would a Customer Exit Formula Variable work?  Is it possible to write ABAP code to query 0MAT_PLANT for the standard price & standard unit via customer exit?  I'm  not real strong in ABAP so example code would be GREATLY appreciated!!!
    Thank you in advance for your assistance,
    Teri

    I just noticed the spacing got messed up on my original post and it looks really confusing.  I need to show the following columns
    Inventory Qty @ Plant X
    Value of Stock @ Plant X
    Standard Price @ Plant Y
    Value of Stock @ Plant Y
    Stock Value Difference

  • 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

  • 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

  • Formula Variable with replacement path on 0CALDAY

    Hi,
    I am trying to enhance an existing query.
    I am creating a new formula variable processing by replacement path.
    In Reference Characterisitic I have choosen 0CALDAY.
    In the tab options , I selected replacement path.
    In the replacement path tab, in Replacement Rule /replace variable with I am trying to select the variable. But in the variable list I am not able to find 0CALDAY variable, which we have already created and restricting in some other key figures.
    Please help me in this regard.
    Thanks & Regards,
    Madhav

    Hey in the replacement path tab you need to choose either its infoobject or variable from which the value needs to be taken.
    If you choose infoobject you get the options of choosing its attributes etc.
    If you choose variable you get option to choose variable associated.
    But under "General Tab" under reference characteristic you need to choose your CALDAY.
    Hope this helps.
    Edited by: Praveen G on Sep 26, 2008 5:53 AM

  • Formula variable / Replacement path issue

    Hi Experts,
    I have a Field which has different status description.
    I want to bring the count of only one preferred description.
    Model Status
    A1     New
    A2     Open
    A3     New
    B1     Closed
    B2      Pending
    B3     New
    I want to view only the closed count of models
    Model Count of Closed
    A1     0
    A2     0
    A3     0
    B1     1
    B2      0
    B3     0
    I tried doing this using the formula variable and Replacement path with Status Field.
    But I'm unsuccessful in selection the desired status.
    Please help me to over come this.
    Thanks

    Hi Dear Prasad,
    I can't restrict the characterstic to Closed. If I do so the output will be only for Closed.
    But here I want to bring every model with value as 0 and 1 for model with closed status.
    Hi Dear Raju,
    The requirement what I have here is more complex. like, the result will be for 6 month displaying every single cal/day.
    and also I have to find out percentage of closed for every cal/day based on number of model we got.
    i have only asked a small portion of it, with this input i will manage to build the percentage etc....
    I  cannot bring counter inside. My report is already too wide to be displayed.
    I have tried similar kind of thing, using CKF, Formula Variable and Replacement path with the Char - InfoObj.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a&overridelayout=true
    But I'm not very sure how do I get only count of the my desired status.
    Please help.
    Thanks

  • Using Formula Variable in Customer Exit variable

    Hi,
    I want to assign valuees of 2 Formula Variables to one cstomer exit variable based on some Characteristic.
    Example. Formula variables are Early and Late. If Early = 3 and Late = 4 , I want to pass value to the Customer Exit variable as Low = 3 and High = 4.
    The problem is in I_T_VAR_RANGE there is no value for formula variable in LOW field.
    Other variables based on Characteristics have values in this field.
    What can I do in this case?
    Regards
    SSS

    SSS,
    You can restrict your characteristic with two variables in the value range options of restricting.
    One can be used as low and the other can be high.
    Hope that helps.
    Thanks.

  • Date Difference between to date formula variable

    Hi Expert,
                    I have create two formula variable one for Document Date and another one for Goods reciept date
    and through formula variable I am subtracting these two formula variable and getting the no. of days between
    document date and GR date.
    This Shows me the correct value for one document date because i am filtering my query according to document
    date,
    while i am giving the date range for document date is shows me incorrect result. bucause document date formula
    variable contains only one date.
    Eg. i am giving the document date range like 01.02.2010 - 28.02.2010.
          In document date formula variable it contains only 01.02..2010 and GR date formula variable it contain correct
    value, thats why the date difference is incorrect because those PO which has PO date like 12.02.2010 for that Doc
    formula variable bring the same date like 01.02.2010.
    Please tell me the solution
    Thanks and Regards
    Lalit Kumar

    Hi Expert,
                     Actually i have created two formula variable on for PO date and another for GR date
    and i've restrict the query through PO date.
    while i am taking the single PO date in Selection parameter it showing me correct difference
    eg: Selection Parameter for PO: 01.01.2010
    But while i am taking the date interval for PO date
    eg: 01.01.2010-30.01.2010
    PO No: XXXXX123 , Doc date: 01.01.2010 GR date: 7.01.2010 then date difference is : 6
    PO No: XXXXX432, Doc date: 03.01.2010 GR date: 8.01.2010 then date difference is : 7 but it is 5
    Thanks and Regards
    Lalit Kumar

  • Restriction of document numbers with a formula

    Hi,
    Can anybody please help me in this reporting requirment..
    I need to restrict the document numbers with a characteristic value(zterm) also with a condition i.e where difference between due date & report date is more than 3 days..
    i need to display only the document numbers with the above..
    regards,
    Rajendra

    Create a calculated KF which formula is
    (due date - report date) > 3
    This formula will have the value 1 if it's true, and 0 if false. Then, remove zeroes in your query.
    If due date and report date are chars, just create 2 formulas variables.

  • Formula variable not displayed in proper format

    Hai,
         I used a keyfigure formula variable, that gets current date, in a query (In columns, key figure structure to calculate no. of days). The no. of days are calculated peoperly and everything is just perfect.
    But after executing the query, when I display text element=> variables, the system is displaying the variable as 20,060,803 as opposed to date format like 8/3/2006.
    Question: Is it how the date formula variable is displayed or there is a system error?
    I remember seeing it in date format.
    Can somebody comment on this or suggest a solution.
    I couldn't find notes on this too!

    In the restricted key figure formula definition, use the Data function "Process Value as Date DATE" and enclose your restricted key figure calculation inside the date parenthesis.
    I have another related problem.  I am trying to use dates to calculate 30 days before a (date formula variable), 60 days after, etc.  Some of the dates are calculating correctly, but some are just returning an X.  All appear to be extracting with the same format.
    Anyone have a similar problem?

  • Difference between Formula, Formula Key Figure & Formula Variable

    Hi Experts,
    I have a basic question in my mind:
    1) What is the difference b/w Formula, Formula Variable, Formula Key Figure?
    2) What is the difference b/w Selection, Filter and Restriction?
    Can you pls explain with some scenarios? That will be helpful.
    Thanks in Advance.

    Hi,
    You are right, these are basic questions and can be learnt just by a little bit searching.So search the forum before posting such questions please.
    Nevertheless :
    http://wiki.sdn.sap.com/wiki/display/BI/CalculatedKeyFigure+RestrictedkeyfigureFilter
    http://help.sap.com/saphelp_nw04s/helpdata/en/61/d0b143aa26b849b4e79a859ea1d7d1/content.htm
    Scenario:
    You want to see the revenue that you get from Product A,B,C in the country of D and E.You also want to calculate a bonus value that will be given to distributors and this revenue will be calculated based on the user's input.E.g user inputs 5 and you give 5% of the sales to distributors.Then here, to get the input 5  and TO USE IT IN THE FORMULA ,you must create a formula variable.You also  must a have key figure revenue to see the revenue of course and a calculated key figure(or a formula) called bonus value = formula variable*revenue/100 to calculate the bonus which will be given to distributors.
    The other thing you must do is restricting product with A,B,C and country by D and E just by right clicking on them  in query designer.What remains is the selection.Let's say you also want to see the total sales of A and B.Then create a selection in the columns then restrict it by dragging and dropping A and B and the key figure revenue.
    By the way, filter(tab) is used to restrict the data coming from cube and affects everything in the report(in contrast to the restricting  selection, because restricting selection affects only the selection, not other fields of the report)
    Regards,
    Güneş BÜYÜKTANIR

  • Formula variable to add three char. date value together?

    We've been struggling to use formula variable (Replacement Path), but never been sucessful!
    We have three row date type of char which are c1, c2, and c3.  Now users would like to see a summation of the three date char.  We believe we will have to use Replacement Path formula variable for each of the char., but somehow the formula variable always show "X" in column.
    Any idea?
    Thanks!

    Hello Kevin,
    you can not summ characteristics but only key figures.
    if you want to see the summ of a key figure for certain characteristic values you need a restricted key figure (with aggregation type sum) and a selection for your characteristic for the 3 values.
    regards
    Cornelia

  • For Mayank Guptha : how to create formula variable in IP

    Hi,
    How to create formula variable, such that it will appear in the variable screen.

    Hi,
    the variables you create in formula function are local to the function.
    Ex., DATA  CST_ELMNT TYPE 0COSTELMNT.
           DATA QTY TYPE 0QUANTITY.
    To get the variables listed in the variable screen you need o create variables at aggregation/filter level for the required characteristics.

  • Is it possible to use charecterestic used in formula variable

    Got a boolean logic in a formula of the  structure in BEx, i could create a formula variable for date , it works .However, i have to bring payment method into the logic ,( e.g.. if the payment method is 'C'-weekly then late payment logic is different then if it is not weekly) , Any idea how to achieve this in BEx.

    You could create a key figure that always displays a fixed value example 1.
    You then restrict this individual key figure to payment method C.
    The key figure is now only 1 for payment method C.
    In your calculation you now say: if key figure = 1 then ... else ...
    If statements are not directly possible, you can only do if statemements indirectly by a similar formula:
    (key figure = 1) * value
    if key figure is one -> result of (key figure = 1) is 1
    1 multiplied by value = value
    if key figure is not one -> result of (key figure = 1) is 0
    0 multiplied by value = 0
    You now have an indirect if clause.
    Please assign points if this solved your problem,
    Best Regards,
    Filip

  • Problem in converty given qty into kgs using variable

    hello,
         i have taken 0ORDER_QUAN with 0PO_UNIT.
    AND 0CML_OR_QTY (confirmed order quantity) with unit 0SALES_UNIT.
      I want two more fields in the query with order quantity in kgs and confirmed order quanity in kgs.
    the formula for order qty in kgs is written as:
    NODIM(NOERR(0ORDER_QUANT * NET WHT)  where net wht is the formula varaible of process type replacement path,
    similarly for the confirmed order qty in kgs.
    but when we execute the query the both the quantity columns in kgs is showing no values.
    is there a problem in the formula variable.
    and one more thing, in the cube 0order_quan is loaded and its unit column 0PO_UNIT  is not loaded and it is blank since it is not mapped to the field in the transfer rule to the source system field.
    should we load data to the unit field so that we can convert order qty into kgs.
    plz suggest me.

    Soujanya,
    Things you might want to do first...
    1. Check if NET WHT is being populated properly... put it directly into the query and check
    2. Put all components of the formula into the query and check if they are all displayed.
    3. Now about the unit issue , since you have used NODIM, I do not think this should be a problem.
    And personally I would side with AVR on the issue of having the same in the routines rather than directly in the query.
    Arun
    Assigning points is a way of saying thank you in SDN

Maybe you are looking for

  • Youtube is completly broken under firefox.(chrome/IE works normally)

    Hello, since a day or two (22/nov/2013) youtube is not displayed proprely, in fact the whole page is a real mess and its unusable under firefox. I had to use chrome to watch videos today because of that. I have the latest flash updates, same goes for

  • How to calculate sigma notation in LV?

    Greetings, I am looking for a method to calculate Sigma notation (see attachment) in LV. I cannot seem to find a way using MathScript to do this. I already attempted to manually write out code to process these formulas, but my results are offtrack (t

  • MX Records suddenly don't exist

    This is more for BC support - I've logged a support ticket but this issue is absolutely critical. (Request #19579) For some reason, the DNS servers aren't broadcasting any MX records for my domain flag.is Is this a BC issue - or should I be chasing u

  • Buying stuff for someone from their iTunes wishlist

    Hi, i'm new to all this so i have a straight forward question. It's nearly xmas, and i want to buy some songs for a child who has an ipod touch. I know they have a wishlist on itunes and i would like to buy specific songs from that list for them. My

  • MDX Rank function

    I am having some trouble getting expected results when using the RANK function. My MDX is below with the result set that gets created.  The [SF OCC Rank] results are correct but the [Net Rentals Rank] is not.  I am wanting to rank each of the measure