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

Similar Messages

  • Date formula variable with replacement path.

    Hi ,
    I have date formula variable with replacement path.
    Variable pop up with date format yyyymmdd. but i want dd.mm.yyyy.
    I have checked my user profile setting and it is dd.mm.yyyy.
    Can u please suggest it .
    Thanks
    Pramod

    Thanks for the rely , but basically i need a variable only for selection.
    thats why i have created formula variable processing my cutomer exit.
    But i think customre exit variable comes with text format .
    any1 has an idea for the same.
    Thanks
    Babu

  • Date Formula variable

    Dear All,
    I have created Date formula variable and i have applied some exception aggregation on that to find Last bill date.
    Now i am creating formula and applying following condition :
    ((If quantity > entered quantity) AND (Quantity2 ==0) ) * Sale date whr Sale date is exception aggr on date formula variable.
    But when i apply this date format is changed to Number format.
    Plz help ASAP.
    Regards,
    SS

    I am using Billing date so it has reference to 0DATE.
    So in this case how do i achieve this?

  • Difference between Temp table and Variable table and which one is better performance wise?

    Hello,
    Anyone could you explain What is difference between Temp Table (#, ##) and Variable table (DECLARE @V TABLE (EMP_ID INT)) ?
    Which one is recommended to use for better performance?
    also Is it possible to create CLUSTER and NONCLUSTER Index on Variable table?
    In my case: 1-2 days transactional data are more than 3-4 Millions. I tried using both # and table variable and found table variable is faster.
    Is that Table variable using Memory or Disk space?
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Check following link to see differences b/w TempTable & TableVariable: http://sqlwithmanoj.com/2010/05/15/temporary-tables-vs-table-variables/
    TempTables & TableVariables both use memory & tempDB in similar manner, check this blog post: http://sqlwithmanoj.com/2010/07/20/table-variables-are-not-stored-in-memory-but-in-tempdb/
    Performance wise if you are dealing with millions of records then TempTable is ideal, as you can create explicit indexes on top of them. But if there are less records then TableVariables are good suited.
    On Tables Variable explicit index are not allowed, if you define a PK column, then a Clustered Index will be created automatically.
    But it also depends upon specific scenarios you are dealing with , can you share it?
    ~manoj | email: http://scr.im/m22g
    http://sqlwithmanoj.wordpress.com
    MCCA 2011 | My FB Page

  • OAB - difference between standard rate and variable rate

    What is the difference between standard rates and variable rates

    These Variable rates will take into effect only when you check the "uses variable rate" check box in standard rate right?
    Yes, variable rates are evaluated only if this flag is selected.
    You mentioned Standard Rate is the rate you attach to a benefit. Where do we attach?
    You donot attach the rate to a benefit in a separate form. You select the compensation object you want to attach the rate to within the standard rates form.

  • Date formula variable in BEx output

    Dear All,
    In Bex , I made a formula variable F_CURDATE and used it in formula. I fill it with current date
    l_s_range-low = sy-datum.
    My value in BEx comes 201,40,604. This is 04 Jun 2014.
    Why isn't it coming in date format. I then, used data function [date]'process value as date. The output shows value X.
    How can I show  date in date format in BEx?
    Regards,
    cleo

    Hi Cleo,
    The bit l_s_range-low = sy-datum must be coming from the customer exit code, right?
    And should this code not be used for populating a cust exit variable? How do you populate sy-datum to a formula variable in the query? Pls correct me if i m missing something in your question.
    However if it is a formula variable on 0CALDAY, there are standard SAP variables giving current date.
    Can you not use them in your query as per your requirement?
    Regards,
    Srilakshmi B

  • No difference between using a local variable and a notifier in timed parallel loops?

    The example code "Pass Data With Notifiers.vi" that came with LV 7.1 illustrates using notifiers with parallel loops.  Just looking at two of the loops, the one that generates the sine wave and the one for "User 1", you can change the timing of the two loops and you can change the condition of the "Ignore Previous" status on the "Wait on Notification".  I have a special case of this to consider, where I'm wondering if there's any reason not to use a local variable instead of the notifier:
    Set the delay on the generator portion (which contains the Send Notification) to something very short, say 5 ms.  Set the delay on the User 1 (which contains the Wait on Notification) to something relatively longer, say 200 ms.  Set the Wait on Notification to False.  Now you have a situation where the User 1 loop action is contingent only upon the loop delay time, since each time the loop timer runs the loop there will always be a value in the notifier.  In this case it seems to behave just like the case where you update a local variable in the fast loop and read it in the slow one.
    Is my understanding correct?  Would there be a performance difference between the two methods?  What do you prefer in this situation and why?
    Thanks,
    Hosehead

    Hi H.,
    I think your idea is to write to a Global Variable in the data-producer VI, and read it in the data-consumer VI(?)
    One reason this might be less efficient than using Notifiers is if you want to graph every new value in the "consumer" - or make sure the value read in the consumer has changed at least once since the last loop.
    > since each time the [consumer] loop timer runs the loop there will always be a value in the notifier...
    > Would there be a performance difference between the two methods? 
    If you don't use the Notification "event" to synchronize the producer and consumer, then to be sure the consumer gets a new vaue, you've made the producer loop faster - every 5 ms - a waste of cpu-cycles.  More often the situation is reversed, that is, there's a consumer that needs to see every single new value, and (without events) the consumer must loop faster than the producer (to catch every new value) - this is called polling and it wastes cpu-cycles.
    Just about anytime one's tempted to make a loop execute "fast" to check on some value (or to make sure there's a fresh value,) there's an opportunity to improve performance through synchronization with events (including notifiers, queues, occurrances, semaphores, and rendezvous')
    tbd
    Message Edited by tbd on 07-09-2006 03:51 AM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Better estimation of phase difference between two signals with variable frequency!

    Hello LabView Gurus, 
    Being a power engineer and having just a little knowledge of signal processing and labview, I have been pulling my hair out for the last couple of days to get a better estimation of phase difference between two signals.
    We have two analog voltage signals; 1. sine wave (50Hz ± 1Hz) and 2. a square wave with exactly half of sine wave frequency at any time.
    At the starting point of operation (and simulation/acquisition) both signals will have no phase difference. However, the square wave's frequency changes unpredictably for a just a few millisecond but then it gets synchronized with sine wave's frequency again. This means that the square wave will be phased out from its original position. The task of the labview is to find the phase difference between the two signals continuously.
    My approach to determine the phase difference is to measure the time when sine wave crosses zero amplitude and the time when the very next square wave changes amplitude from zero volts to +ve voltage (I have a 0.5volts threshold just to avoid any dramas from small line noise). The difference between these times is then divided by the time period and multiplied by 360 to get this phase difference in angles. 
    As this part is just a small block of a big project, I can only allow 5000Hz sampling rate each for both signals. I read 500 samples (which means I read data from 5 cycles of sine wave and 2.5 cycles of square wave).
    Now the problem is, as long as the frequency of sine wave stays constant at exactly 50Hz, I get a good estimation of the phase difference but when the frequency changes even a little (and it will happen in the real scenario i.e 50Hz ± 1Hz  and the square wave's frequency is dependent of sine wave's frequency), the estimation error increases.
    I have attached my labview program. From front panel, you can set the phase of square wave (between -180 and 0) and you should see the labview's calculated phase in the indicator box named 'Phase'. Then you can press 'Real Frequency' switch that would cause the frequency to change like it would in real operation.
    You can observe that the estimation error increases after you push the button. 
    All I need to do is to reduce this estimation error and make it as close to the actual phase difference as possible. Any help would be greatly appreciated.
    I am using LabView 2009 for this task.
    The application is for electric machines and the stability/performance of machines under different faults.
    Thank you for reading this far!
    Regards,
    Awais
    Attachments:
    v603.png ‏320 KB
    v603.vi ‏186 KB

    Jeff Bohrer wrote:
    Basic math gives me a bit of pause on this approach.  You are sampling at 50 times the frequency of interest so you get 50 samples per cycle.  your phase resolution is 1/50th cycle or 7.2 degrees +/- noise.  You will need to samlpe faster to reduce phase resolution or average multiple readings (at a time cost that is signifigant)
    Jeff- (Hardly Working)
    I am sampling at 100 times the sine wave's frequency and 200 times the square wave's frequency.  Increasing the sampling rate completely solves my problem. But since I am acquiring several other inputs, I cannot afford a sampling rate higher than 5kHz.
    F. Schubert wrote:
    I'm not a signal processing expert, but here my basic understanding.
    If you simulate sampling with 5kHz and a frequency of 50 Hz (and both are 'sync' by design), you always get an exact 5 periods. Any variation of your signals frequency gives you a propability to get 4 or 6 'trigger' events. That's an up or down of 20%!
    The one measure to reduce such problems is using 'window functions'. They don't fit your current approach (counting instead of a DSP algorithm), so this needs to be reworked as well.
    My approach would be to use the concept of a Locki-In amplifier. You need to phaseshift your ref-signal by 90°. Then multiply your measurement signal with the ref signal and the phase shifted ref signal. The obtained values for x/y coordinates of a complex number. Calculate the theta of the complex number (with the LV prim). Feed this in a low pass filter.
    The trick on this is, that the square wave has harmonics in it, in this you are interested in the second harmonic which is the sine wave.
    To get rid of the effect that the sync between sampling rate and ref signal frequency gives an error, you then can use the window I mentioned above (place it before the lock-in).
    For a design that really plays well, use a producer-consumer design pattern to get the calculations done in parallel with the DAQ.
    I suggest you to check on wikipedia for some of the keywords I mentioned. Go also for the external links which lead to great tutorials and AppNotes on the signal processing basics.
    Sorry, it's not a simple solution I offer and we will have quite some conversation on this forum if you follow this path. Maybe someone else knows a simpler way.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    An interesting view. the sine wave can indeed be looked as a second harmonic of the square wave. I will implement your idea and get back to you as soon as I get some results. But since I have very limited knowledge of signal processing, it might take me a while to get my hear around the solution you mentioned.

  • Difference between volatile and atomic variables (util.concurrent.atomic)

    All,
    Can some one explain to me the difference between using
    volatile variables and atomic variables as incremental/decremental counters
    that is shared by multiple threads.
    when should I use volatile and when should I use atomic variables.

    angeshwar wrote:
    All,
    Can some one explain to me the difference between using
    volatile variables and atomic variables as incremental/decremental counters
    that is shared by multiple threads.
    when should I use volatile and when should I use atomic variables.
    x++ is not atomic for a volatile variable. You can have ten threads executing that concurrently and only get a increment of one when it should have been ten. This problem won't happen with AtomicWhatever.

  • What is the difference between using a global variable,passing a valuee and using a reference?

    I have created a project that consists of several VIs.  Only the main VI has a front panel and the others perform functions.  The function VIs are dependent on controls on the main VI's front panel.  I have several ways of passing the value of the controls.  One is to use a global variable and just place it on the dependent VIs.  Another option is to strictly connect the terminal from the control to a VI connector block and pass the value directly.  My last option is to create a reference of the control and reference it inside the dependent VIs, but this would also require connections to be made to the VI block.
    What are the advantages/disadvantages of these options?
    -Stephen

    5thGen wrote:
    I have created a project that consists of several VIs.  Only the main VI has a front panel and the others perform functions.  The function VIs are dependent on controls on the main VI's front panel.  I have several ways of passing the value of the controls. 
    1) One is to use a global variable and just place it on the dependent VIs.
    2) Another option is to strictly connect the terminal from the control to a VI connector block and pass the value directly. 
    3) My last option is to create a reference of the control and reference it inside the dependent VIs, but this would also require connections to be made to the VI block.
    What are the advantages/disadvantages of these options?
    -Stephen
    1) Globals are evil and introduce race conditions.
    2) The sub-VI only get the value when it was called and updates that occur while the sub-VI is runing are not sensed by the sub-VI
    3) This uses property node "value" or "value signaling" both of which run the user interface thread which is single-threaded and you incur a thread swap hit to performance. You also have a potential for race conditions.
    The are various methods for sharing dat to/from sub-VI which include Queues and Action Engines.
    I hope that hleps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • What is the differences between object and other variables?

    For example:
    Object[ ] mm=new Object[10];
    int[ ] mm=new int[10];
    what are their differences??? How to use them correctly??
    Thank you very much!!

    Would you please explain deep about it ?????
    the most important is when to use object and when to
    use other primitive data type
    (int,float,long,double)??
    Thank you very much!!!Each type, whether primitive or object, models some idea or thing or abstraction.
    Use primtives when you just need raw values with no behavior. If you need an integer number, you'll generally use int, sometimes long, rarely short.
    Use objects when you need the concepts they model--String when you want a string of text, Date when you want to represent a date, whatever class you create (Person, Student, Car, Whatever) when you need to use or manipulate the concepts they model.
    Use the object wrappers for the primitives--Integer, Double, etc.--when you want to represent the number but you're using it in a context where objects are required--e.g. when adding them to a collection.

  • Difference between this,var and variables

    Hi all,
    Can you give in simple English "this","var" and "variables"
    differ and their purposes?
    The docs in google are confusing,Thank you all.

    Consider this:
    X.CFC
    ==========================
    <cfcomponent>
    ___<cfset this.foo = "foo"> <--- Public
    ___<cfset Variables.bar = "bar"> <--- Private
    ___<cffunction name="tryme">
    _____<cfoutput>
    ______#this.foo#<P>
    ______#Variables.bar#
    _____</cfoutput>
    ___</cffunction>
    </cfcomponent>
    ==========================
    Example 1: You can do this:
    <cfobject type="component" component="x" name="xObj">
    <cfoutput>#xObj.tryme()#</cfoutput>
    It'll output "foo bar"
    Example 2: You can't do this:
    <cfobject type="component" component="x" name="xObj">
    <cfoutput> #xObj.foo# #xObj.bar#</cfoutput>
    It'll get upset on the #xObj.bar# part because it's private -
    meaning only the CFC can access and manipulate a Variables variable
    inside it's CFC.
    However #xObj.foo# works because it's public, the CFC can
    access and manipulate it's own this variable, and anything outside
    of it can too.

  • Difference between Dates: BW Query???

    Hello all,
    A.I have to get the difference between dates i.e Date1 and Date2.
    I have used a 2 formula variables for each one of them with Replacement path - Key - number as the settings.
    When i execute the difference between the 2 formula variables, i get inconsistent results if the dates are from 2 different months.
    Example(Correct Result)
    Date1 = 14.02.2005
    Date2 = 10.02.2005
    Result = 4
    Example(Incorrect Result)???????
    Date1 = 14.02.2005
    Date2 = 10.01.2005
    Result = 104
    Iam know that system is converting the date as a number like 20040214 and 22040110 and just substracts.....This is not correct....any solution to circmvent this problem???
    B.If iam using a user-exit for variables, how to pass the values Date1 and Date2 to user-exit so that i can calculate the difference of days using a function module.
    I know how to use a user-exit but not sure about working on 2 fields at a time for a formula variable????

    1) For the first problem, I think you should play with the replacement path settings (type, offset,...).  I did this before and I'm sure it worked.
    2) If the variables are entered in the variable screen there is no problem to use a function module (it works with steps --> look at the how-to), but I think you want to calculate not on variables but on the keyfigure values itself, in this case you will have to use virtual characteristics.  There is also a how-to about this, I can't help you with the details my self.
    kr,
    Tom

  • Formula Variable: Current Date

    Can somebody let me know the SAP Delievered Current Date Formula Variable Name.
    Cheers!!
    Amit
    9990800302

    Hi.......
    As already said....you can use 0F_ADAY.....
    Usually global variables (as formula) are available for every query (and not specifically to a single provider)...in addition, you can find all the formulas when you build a new object (new formula) in your query (you can choose from formula hierarchy)...
    Check this..........
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/324de5a1-0201-0010-dc9a-a093cde87bb5
    Customer Exit.......
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
    Regards,
    Debjani.........
    Edited by: Debjani  Mukherjee on Oct 29, 2008 4:47 PM

  • What is the difference between Constant Window, Variable Window,Main Window

    hello all
    what is the difference between 1) Constant Window
                                                2) Variable Window
                                                3) Main Window   in SAP SCRIPT

    Hi,
    Window Types
    When defining a form window, you must select a window type for the window.
    You can choose between three types:
    Constant Windows (CONST)
    Variable Windows (VAR)
    Main Windows (MAIN)
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR.
    Therefore, if you create a new window, always use type VAR.
    Variable Windows (VAR) 
    The contents of variable windows is processed again for each page, on which the window appears.
    The system outputs only as much text as fits into the window. Text exceeding the window size is truncated;
    the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike.
    The only difference is that constant windows have the same size throughout the form.
    Main Windows (MAIN) 
    Each form must have one window of type MAIN. Such a window is called the main window of the form.
    For SAPscript forms, the main window has a central meaning:
    It controls the page break.
    It contains the text body that may cover several pages.
    It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to
    output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form.
    The SAPscript composer thus avoids reformatting of the text after each page break.
    If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page.
    This page must not call itself as subsequent page (recursive call), since this would produce an endless loop.
    In such a case, SAPscript terminates the output after three subsequent pages.
    For printing header lines or totals, the different output areas of the main window are of special importance.
    go through this links:
    In Scripts Variable window and constant wind difference?
    Main Window
    Re: Main Window in SAP Script
    What is the difference between Constant window and variable window?
    Regards
    Adil

Maybe you are looking for