Time Period Syntax

Hello,
I am trying to get a report for a list of documents within a time period.
I want the start date as optional, in the sense, if the input criteria is not filled, it should give right from the beginning. Same with end date, if the input criteria is not filled, then the current date must be considered. How do we go about this?
I am using the following snipet of code
T1.DocDate between [%1] and [%2]
How do I make input of the dates optional, since in this case, it gives me 0 output.
Thanks
Prajwal

Hi,
In Business One Version 2007 when you run the query and you do not choose any value for the date variable, SAP Business One assigns the value 01/01/1900 (January 1st 1900) as a default value instead of leaving the variable with the empty string ('').                                                            
To reach a correct functionality of your query please modify it as following:
((T1.DocDate >= [%1] and [%1] <> '19000101') or [%1]='19000101')
AND ((T1.DocDate <= [%2] and [%2] <> '19000101') or [%2]='19000101')
Please refer to SAP note no. [1237002|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1237002].
hope it helps,
Regards,
Ladislav
SAP Business One Forum Team
Edited by: Ladislav Meszaros on Nov 18, 2008 12:22 PM

Similar Messages

  • Case function for time period

    I want to count the rows based on the date values and time periods of a date column. e.g.
    08/01/01 00:00 - 01:30 (row count)
    08/01/01 01:30 - 02:00 (row count) etc.
    I'm using the case function to create the time periods from the date column but I'm getting a syntax error, 'missing keyword' at between. How can I code the case statement to create the time periods. The following is the sql code I'm using.
    select TO_CHAR(START_TIME, 'yyyy-mm-dd') as process_date,
         case START_TIME
                   when TO_CHAR(START_TIME, 'hh24:mm') between '00:00' and '01:30' then '12:00 - 1:30 AM'
                   else 'unknown'
         end as process_time,
         count(*)
    from V8_Event_Vw event
    group by TO_CHAR(START_TIME, 'yyyy-mm-dd'), START_TIME
    Thanks,
    Tom

    select TO_CHAR(START_TIME, 'yyyy-mm-dd') as process_date,
    case when TO_CHAR(START_TIME, 'hh24:mm') between '00:00' and '01:30' then '12:00 - 1:30 AM'
    else 'unknown'
    end as process_time,
    count(*)
    from V8_Event_Vw event
    group by TO_CHAR(START_TIME, 'yyyy-mm-dd'),
    case when TO_CHAR(START_TIME, 'hh24:mm') between '00:00' and '01:30' then '12:00 - 1:30 AM'
    else 'unknown'
    end
    *untested (as if I really needed to say that)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Report workload by calculating how many versions of SharePoint list items created in a certain time period

    I have a total of 66 SharePoint 2010 lists - yes, 66! - each lists contains between 1500 and 3200 list items.  My employees update these various list items throughout their workday.  Each update to a list item creates a new version of the list
    item.  On average each list item will have anywhere from 5 to 10 versions before it is done.  I need to create a report that tells me how many list items they've updated in a certain time frame.  I have come close but still cannot arrive at
    the data I'm looking for. 
    This is what I have so far:
    I've created a report using SQL Report Builder 2008 v3 where I've filtered it to show only items MODIFIED between, for example, Feb1 and Feb28.  Of those records, I want the report to tell me how many versions were created during that time
    frame.  The result is one list item with 5 total versions.  Versions 1.0, 2.0, & 3.0 were created on 12/12/14.  The last two versions, 4.0 and 5.0, were created on 2/24/15.  Therefore, the answer I'm looking for is 2 because they
    created 2 versions between Feb1 and Feb28.
    However I get the following results using these queries:
    If I do a =Sum(Fields!owshiddenversion.Value) in the expression field I get the total versions which is 5
    If I do a =Count(Fields!owshiddenversion.Value) in the expression field I get the instance which is 1
    Is there a way to count ONLY the number of versions created in a time period?  Is there another hidden field in SharePoint that I can use in the expression that will give me results I'm looking for?

    Hi Rafael70,
    Per my understanding that you have already get all the need fields and informaiton of the updated version of list items and now you want to calculate how many versions of SharePoint list items created in a certain time period, you can't get desired result
    using sum and count function, right?
    I have tried to tested on my local environment but because I am not clear what is value in the field "owshiddenversion", I assumed you have two datatype parameters (StartDate and EndDate) to help filter the report in a certain time period.
    Generally, if you have add the filter correctly, it will filter the correct number's updated version in this time period, I would like you to provide details information as below to help better analysis the requirements:
    Could you please provide sample data of the table.
    Please provide snapshot of the report structure you have currently designed.
    Please try to provide all the expression you have used.
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Closing characteristic after a time period

    Dear All,
    I am looking for a way to close an inspection charcateristic automatically after a certain time period.
    I have 3 characteristics for my inspection lot. The first should be closed 20 hours after generation of the inspection lot. The second 15 hours after that and the third 5 hours after that.
    Is there a way to do it?

    You can only make automatic UD for inspectoin lots if you meet the other requirements, which I doubt you do.  I.e. all required characterisitics have a status of 5 and all of those use a fixed scope.  You could make all your characterisitcs optional but that could lead to a whole bunch of non-processed lots.   I.e. if the wait period is met, the lots will be closed out.   This might be problems if some day the lab falls behind or is gone over a long planned outage.  It also runins the ability to indicate to techs the optional vs required characteristics!
    FF

  • How do you set the time period on IMAP email accounts (razr maxx)

    Hi Guys -
    Does anyone know how you can set the time period that the stock email will keep the already downloaded messages for IMAP email accounts?
    Mine never seems to show more than a couple of days worth at a time. I'd ideally like to be able to see at least 2 weeks worth of messages without needing to download them again!
    On other phones I've had there was a setting in the menu, but either I can't find it...or it's not there. I've found the setting for how OFTEN it checks the accounts, but not the setting I am seeking.
    Your help is appreciated!
    Best Wishes for the Holiday Season.
    -Rich

    Hey Rich.  Once in 'settings,' there should be a "days to sync' under the 'data usage' section.   You don't have that?

  • Is there a way to create a smart playlist that lists my top 25 plays from a specific time period (i.e. - top plays from the last 90 days)?

    Is it possible to create an itunes smart playlist that lists my top 25 most played songs in a specific time period (i.e. - the last 90 days)?  It seems that any "most played" list I create counts every spin a track has had in it's history of being in my library. 

    The challenge is is not to determine which of the tracks that have been played in the last X days has been played most since the beginning of time, but which have been played most in the last X days. iTunes can do the first one but it simply doesn't have the power to do the second.
    tt2

  • Hyperion planning data form in smartview: problem with summary time period

    We are using Planning ver. 11.1.2.2.300.20 and smartview 11.1.2.2.300 (build 070)
    We use common Data Form:
    In columns: Periods (Descendants including YearTotal - with no checkbox on start expanded)
    In Rows :accounts
    In some of our users computers,
    When they open Data Form in Excel (with Smart View) - its appears very strange:
    Summary Accounts are displayed as level 0 account in the summary Period columns (i.e. not in grey) and permit entering data.
    In addition when Entering data in summary time period (i.e. Year or Quarter),
    strangely,  the data doesn't  spread to the descendants months (level 0) .
    This phenomenon occurs just in few of the computers.
    Please help, how can we overcome this problem?
    Thanks and Regards
    Tami Kedem

    Hi Celvin,
    Thanks for your rapid response!
    All computers have the same version of planning and smartview.
    The computers where the Periods spreading and aggregation properties in Data form are not working,
    do work wonderfully when opening the Data forms in the web.
    I've tried everything, (remove suppressing, validations etc.):
    In all kind of data forms the spreading and aggregation properties on summary time periods are not working in smartview -
    and summary accounts on rows are not displayed in grey and permit entering data.
    We remove and reinstall MS-Office (2007) from the problematic computers, but it didn't help.
    Do you know if there is any kind of settings or softwares that might cause this phenomenon
    i.e. interrupts the smartview translation of the web Data Forms.
    Thank and best regards,
    Tami Kedem

  • Query for Old Data that does not match New Data within a given time period

    Hello all,
    One of the reports I need to create is for all associates who went from one department to another within a given time period. The way I ran this report in Reportsmith (pulling from our old system) was to compare the dept field from the beginning date to the dept field at the end date and it would give me those associate's that had moved. I had to do it this way b/c dept changes can happen using several different types of actions (supv change, promotion, etc.), none of them exclusive to just dept changes. We are now using Oracle HRMS and I need to create this same report with this system using SQL.
    Does anyone know how to compare data between two different dates and pull the ones that don't match? Your help will be GREATLY appreciated!
    Warm Regards,
    Yasmin E. Alberto
    HRIS Analyst
    [email protected]

    Hi, Yasmin,
    In the sample data you posted, nobody changed departments between May 1 and May 11. In fact, there were no assignments of any kind between January 16 and May 17, so I wouldn't expect any output for that period.
    A person (or rather, a duck) did change deptartments on May 20, so if you change the upper limit of the date range to
    AND    ASG_LAST_UPDATE_DATE < TO_DATE ('05/21/09', 'MM/DD/RR')you should see her.
    You've probably noticed that this site likes to compress white-space.
    To post formatted text (such as table results or indented code) type these 6 characters:
    (small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Get a waveform graph to stop plotting after a given time period

    I am doing a research project looking at the effects of modifying visual feedback on a person's current force output. I have a waveform graph that plots the target force level they are trying to match (specified by me) and next to it a second plot showing their current force output (in real time). I am trying to make a condition where the current force output plot (or really the whole waveform graph) stops plotting after a 10 s time period, but can't seem to get it to work. It either plots for the whole trial, or does not plot at all. Is there a way to put a timer on a waveform graph in order to tell it to stop plotting after a specified time period?
    Thanks!

    Hi again,
    I have tried to open the .vi you sent, but I have version 8.2 (yours is in version 8.5) and cannot open it. Is there a way for you to tave the.vi so that it can be opened with earlier versions of the program?
    I have attatched my .vi to this message as well.
    Attachments:
    bimanual combined with metronome_conds.vi ‏174 KB

  • Error : Period dimension 'Period' is missing a Base Time Period member 'Jun' that has been deleted since the last deployment. Base Time Period members cannot be deleted once the dimension is deployed

    HI,
    I am using V11.1.2.2 Hyperion Planning. I am currently getting an error:
    Error : Period dimension 'Period' is missing a Base Time Period member 'Jun' that has been deleted since the last deployment. Base Time Period members cannot be deleted once the dimension is deployed
    This is what i got when i tried to add alternate hierarchy to my shared dimension. I tried to delete it and it messed up.
    NOw it wont deploy my application.
    Can any one suggest.
    Thanks in advance
    Cheers,
    XXX

    EPMA!!!!! EPMA!!!!
    I'm playing around with it to write a blog post and it is crazy. Only possible workaround (till now i'm not able to figure out a solution to it) is to copy the application and deploy it as a new one. Take copy of all objects (forms, tasklist etc). Delete the corrupted application and rename the new one to old.
    Regards
    Celvin
    http://www.orahyplabs.com

  • I have a 1st generation Time Capsule with current firmware. Can I define the time periods when my children's devices have access to the wi-fi network?

    I have a 1st generation Time Capsule with current firmware. Can I define the time periods when my children's devices have access to the wi-fi network?

    Can I define the time periods when my children's devices have access to the wi-fi network?
    Yes, using the Timed Access feature in AirPort Utility, you can setup specific rules for each wireless device which define the exact timeframe each day that the device will be allowed to connect to the wireless network.
    Example....junior's iPhone can connect.....
    Everyday......Between.....9 AM and 10:00 PM
    or
    Weekdays.......Between......4 PM and 9 PM
    and Weekends.....Between......9 AM and 11 PM
    At the same time, your own personal devices will have Unlimited Access at all times.

  • How to find out the rows inserted between a time period.

    Hi,
    Please help me to solve this.
    Table - emp.
    Colmns - empno(Primary Key),ename, mgr
    How to find out the rows inserted between a time period.
    For eg:- Between 02-Oct-2006 1 PM and 03-Oct-2006 2 PM.
    regards,
    Mathew.

    Hi,
    Maybe work:
    For each row, ORA_ROWSCN returns the conservative upper bound system change number (SCN) of the most recent change to the row. This pseudocolumn is useful for determining approximately when a row was last updated. It is not absolutely precise, because Oracle tracks SCNs by transaction committed for the block in which the row resides
    e.g.:
    SGMS@ORACLE10> create table test(cod number);
    Table created.
    SGMS@ORACLE10> insert into test values (1);
    1 row created.
    SGMS@ORACLE10> insert into test values (2);
    1 row created.
    SGMS@ORACLE10> commit;
    Commit complete.
    SGMS@ORACLE10> insert into test values (3);
    1 row created.
    SGMS@ORACLE10> commit;
    Commit complete.
    SGMS@ORACLE10> select SCN_TO_TIMESTAMP(ora_rowscn),ora_rowscn,cod from test;
    SCN_TO_TIMESTAMP(ORA_ROWSCN)       ORA_ROWSCN        COD
    06/11/06 08:56:56,000000000         727707205          1
    06/11/06 08:56:56,000000000         727707205          2
    06/11/06 08:57:05,000000000         727707210          3Cheers

  • How to display the color of time period and the legend in Calendar view?

    Hi,
    Sorry to disturb you guys with a quite simple question.
    I want to do a calendar view to display the period of absence for the portal user. I've setup the iView but it displays neither the color of time period nor the legend.
    The problem is:
    1) If I test with <i>static legend</i> (that is, I input the time period directly in the form instead of using data service),
       a) I could only define <b>one</b> time period, because it's impossible to map the <i>out</i> port of calendar to <i>in</i> port of form on defining the event as 'goto'.
       b) I can't see the color displayd while deploying although there is just one time period! Neither the legend. I' ve given the label and color of the legend and assigned the action as default in design board. Why it doesn't work?
    2) If I test with <i>dynamic legend</i> following the chapter "<i>Display Date on a Calendar</i>" in the <i>Modeler's Guide</i> of VC;
        I assigned @RECORDNR to 'ID legend field', and used BAPI_ABSENCE_GETLIST as dynamic legend data service to edit the legend, and assigned the color for every ID. But neither color nor legend could kindly appear. What's the problem? Is there any error in the edit of entry list of the legend?
    Please help me! Thanks!!!

    Is there any advice?
    I'll greatly appreciate your help!

  • Vendor evaluation report for a definite time period

    Hi Experts,
    Vendor Evaluation Summary Report required for the vendors for a definite time period. Output of the report should show the scores of vendors for criteria like Price, Delivery, Quality, Service and summation of all these scores.
    Please let me know if any standard report is available which can fulfill my requirement.
    Thanks in advance.
    Kishore.

    Hi,
    ME6H report is not fulfilling my requirement since i require the output format in the form like vendor, vendor name, plant, price, delivery, service, quality and the summation of scores given to these criterias.
    Thanks
    Kishore.

  • WRT110: I want to create an access rule for one client for one application during one time period

    I have a problem with one of the clients on my LAN which is running uTorrent to detriment of everyone else. It saturates the pipe. I have been unable to prod this user into bothering to tweak their settings to throttle bandwidth back and so have resorted to an access rule on the router which kicks that MAC address off during a particular time period during the day. But as irritated as I am about this slacker sense of outrageous entitlement, kicking them off entirely seems a tad heavy handed even for me.
    So, In the router I can create a rule per MAC address and specify time. But is it possible to limit this to denying uTorrent ONLY? And if so what port or port ranges would I use.
    Alternatively I already use a QoS setting for one of my VoIP TA's. Would I gain anything by degrading the application indirectly by creating a QoS = LOW for that port range? Again, I don't really care about any other application, just uTorrent and just that client. How much degradation is there really in setting QoS to LOW?

    Well it wont make much difference, when you enable QOS service on your router. Yes it is possible to Deny uTorrent application from your Router. When you are Under "Application and Gaming" Tab, Under "Blocked Application" you will find "Application Name" , "Port Range" and "Protocol" so you need to input under Application Name "uTorrent" and under port range you need to input the port number which uTorrent application use and then under protocol select "Both" and click on ADD. Then again in Application you will find uTorrent , select and click on (>>) right arrow so it will block that application on your Router. By doing this it will block uTorrent from your Router.

Maybe you are looking for

  • How to Set Up AirPort Extreme 802.11n only Network

    I purchased a used AirPort Extreme base station and a used AirPort Express off eBay to upgrade my home network. Both are the latest model AE (dual band II, firmware 7.5.1) and AX (802.11n, firmware 7.4.2). I want to use my AE as main router (Internet

  • Partitioning previously used Windows NT File System for use with Mac and PC

    With reference to this thread I found when searching for a solution: Can Windows NT File System(NTFS) format external hard drive work on iMac? Below is the comment which led to me creating this new thread. "rkaufmann87Sep 8, 2014 8:26 AM Re: Can Wind

  • FF15 hangs whenever plugin-container.exe is loaded in memory

    I need help. Since at least in v14 and now v15, FF hangs becoming unresponsive whenever plugin-container.exe is loaded in memory, as monitored with Process Explorer of SysInternals. This happens in FF with all plugins manually disabled and with no ex

  • Is there a way to monitor write ?

    I am trying to write a small program to make sure that a Java application does not write anything on a disk outside of a predefined folder. Is there a way to monitor write instructions as they go to memory to detect potential writes ? Thanks Cedric

  • SBWP In box

    Hi all Is there a way to tell or a report that can be run that shows all users who have activated thier subsitute in thier SAP in box for purchase order / req approvals? Thanks