Select records with a date greater than today
Hi,
I have a table that lists leases, and each lease has an expiration date (stored in three fields; EXPYR, EXPMN, EXPDA).
I want to create a report that selects just those records that have an expiration date later than the date when the report is run.
Any ideas?
Jon,
I'm assuming that the 3 fields are Year, Month & Day...
Create a formula...
Date(EXPYR, EXPMN, EXPDA)
Then, for your record selection, create the following formula...
{@DateFormula} > CurrentDate
HTH,
Jason
Similar Messages
-
Select only dates greater than static value
I am retreiving dates from an sql table, currently I am pulling all the dates. How do I only pull dates greater than say 5/1/2008?
Below is the current code.
String strSQL = "Select convert(nvarchar, wk_dt, 101) as outDt From t_fiscal_weeks Where wk_dt <= '" +
DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(new java.util.Date()) + "' Order by wk_dt desc";
Thanks for the helpAlways, always, always use a PreparedStatement: [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html]
-
How can I make a report of all records with the date in the last two weeks?
Hi!
I have records with a date field, I want to create a report that only includes records with a date which is within the last two weeks of the system date, is this possible? Surely this is a basic database function, I would have thought, but I can find no help about it and there's very little in Mac Help about doing anything other than simple stuff with reports.
I'm not a genius with databases, so help with any required formula or what have you would be great!Hi Jonathan,
Here's a formula you can use with the Match function. 'Date' is the name of the date field, which must be a "Date" type field.
'Date'>NOW()-14
Match will select (highlight) all records matching the query. You'll then need to use Organize > Hide Unselected to show only the matches.
Unfortunately, I haven't found a way to make the NOW() function work in a Find request, and neither Match requests nor Hide Unselected can be included in a recorded search, either of which would reduce repeating the report to a one-button operation.
Regards,
Barry -
Aprroval for Invoice have due date greater than 100 days
Hi all!
I would like to create query to approve for Invoice have due date greater than 100 days.
SELECT 'true' from OINV where max(datediff(day, OINV.docduedate, getdate()))>100 and OINV.docstatus ='O' and cardcode = $[$4.0.0] group by cardcode
It's not working. Can you help me!
Thanks!Hi Tien,
Hopefully not trying to teach you how to suck eggs here, but it looks like the query is doing too much. There shouldn't be a need to perform a "GROUP BY" in a query to dictate if an approval is to be triggered or not, only the criterai to make it happen.
For examle, the following code will send a transaction for approval if the customers code equals a specific reference.....
SELECT 'TRUE' FROM ORDR T0 WHERE ${ORDR.CardCode} = 'ABC001'
If you're wanting a query to just return a boolean answer based on the date criteria, you might want to try adapting your query to something like.......
SELECT 'true' from OINV where max(datediff(day, ${OINV.docduedate}, getdate()))>100 and ${OINV.docstatus} ='O' and cardcode = ${$4.0.0}
(As an additional tip, in order to test a query that you're wanting to use as either a formatted search or approval type selection, when in the transaction, if you locate the relevant saved query under "Tools > Queries > User Queries" etc, where you have references to specific fields e.g. ${ORDR.CardCode}, this will pick up the values from the current record and give you a what if scenario. I tend to have just a "Temp" query I use for WIP type queries of this nature.)
Note - You need to replace the bracket's "{}" with square ones, I've used the others as the forum posts as a http reference.
Hope this helps!
Julian -
Selecting records from multiple dates but specific time
Hi:
I've to select records of multiple dates but the time should be 00:00:00 to 06:00:00 (i.e. 12 AM - 6 AM)
For date part this can be done:
WHERE
START_TIME BETWEEN TO_DATE('04-01-2012', 'MM-DD-YYYY') AND TO_DATE('04-05-2012', 'MM-DD-YYYY')
But how can I fix the time mentioed above.
Please let me know.
Thanks/TanvirWHERE
START_TIME BETWEEN TO_DATE('04-01-2012', 'MM-DD-YYYY') AND TO_DATE('04-05-2012', 'MM-DD-YYYY')
and start_time - trunc(start_time) between 0 and 6/24start_time - trunc(start_time) will give you the fraction of a day. So 6/24 means 06:00.
(When you use to_char(trunc(sysdate,'hh'),'hh24') between 0 and 6 you will also retrieve records with start_time 06:01 for example. So this would not meet your requirements as far as I understood.)
Edited by: hm on 10.04.2012 01:26 -
In ITunes,
my library was about 55 G. I have a Ipod Classic 160 G. I synchronised my IPod
on ITunes and I checked the tag Convert
songs with a throughput greater than 128 kbit / s ACC before
synchronisation I took maybe 6 hours to synchronise, and afterward my library was
about 42 G. All my tunes, more than 9500, seem still be in library. Most of my
library is from music purchased in ITunes store along with copies on my old CDs
an some MP3 files from other discs. This is good for me but what happened?This is good for me but what happened?
I don't understand the question... Did something happen that you think should not have happened?
It took such a long time to sync, because iTunes was converting songs with bit-rate higher than 128 kbps "on the fly" while syncing. That takes much longer than just syncing the songs.
Also, since you have so much space on your iPod (compared to the size of your music library), you should not use that "convert to 128 kbps AAC" setting. For songs that are encoded higher than 128 kbps, the conversion reduces sound quality. You may want to uncheck Sync Music and Apply, to remove the songs on the iPod currently, and then sync it all again without the "convert" setting checked this time. -
How to Create Purchase Order with Co Product greater than Consumption
Hi All,
I'm new to SAP. Can any one please help with the steps to create PO with Co Product greater than Consumption.
Thanks in Advance.Hi Srinivasu,
If you are talking about handling by-products during subcontracting follow the following steps.
Create Purchase order with item category "L". In the components tab maintain by-product in negative quantity. If you are not sure about the actual quantity, enter theoretical quantity ( Actual quantity can be adjusted in Subsequent adjustment in Goods receipt).
Hope this helps you.
If this has not helped you, please elaborate your requirement.
Thanks
Vasuki B S -
Exit or BAdi for Validating GR posting date Greater than PO creation date.
Hi all ,
Is there any Exit or BAdi for restricting users to post GR date greater than PO creation date.
Regards
Gibi PhilipGibi,
check this:
MB_CIN_LMBMBU04 posting of gr
Amit. -
I am trying to get a report from a bank site and a box pops up asking me to choose a to date greater than from date. I have the correct dates chosen. Is there a fix or away around this.
Check the date and time in the clock on your computer: (double) click the clock icon on the Windows Taskbar.
*https://support.mozilla.com/kb/Secure+Connection+Failed -
How to fill selection box with clientside data?
i want to make a html form that reads option values from the client.
Because there are too many data, it's not reasonable for me to design a page which connects to server each time to fill the selection boxes.Instead i want to check if data resides at the clientside, if so fill selection boxes with that data, if not download it for the first time and store it on the client for later local retrieval.In addition i must be able to update that data residing on the client when i want.Hi,
I can tell you some hints. Use cookies to store the information on to the client-side. You can read data from cookies using JavaScript. If you want to store huge amount of data on to the client-side, perhaps this would not be a better idea. In J2EE architecture we often use sessions to store values. You need to design your implementation in such a way that for the first time you fetch all the values from the database and put it in a session, and the next time onwards you can get the values from the session itself and thereby you can avoid going to database each and everytime. Write a Java class which has all the necessary get and set methods and store the object in the session. Using that object reference you can set and get the values from it. I hope this will help you.
Thanks -
Transferring data to a flat file with a length greater than 255 bytes??
Is there a way to do this? At the end of the month, my dataset will reach a length of anywhere between 271 and 335. Even though I have the transfer field setup with a length of 512, I am only getting 255 characters worth of data when I pull the flat file in from the server.
Has anyone discovered a way to handle this? I cannot break the record up into blocks of 255, the Transfer has to be able to handle something greater than a length of 255.
Many Thanks!
Tavares L. PhillipsOK - according to OSS note 626010:
Short text "TRANSFER f TO dataset" ignores LENGTH addition
Responsible SAP AG
Component BC-ABA-LA
Syntax, Compiler, Runtime
Long text
Symptom
In rare cases, the "TRANSFER f TO dataset" statement ignores the LENGTH
addition.
Other terms
DATASET, FILE
Reason and Prerequisites
This is caused by a kernel error.
Solution
The error is corrected for SAP_BASIS 6.20 using kernel patch 848.
Valid releases
Software Component Release
from to
SAP_BASIS SAP Basis component
610 - 620
It's an old note but...?
Rob -
Using EVDRE to return only records having a value greater than X
in the old reporting wizard you could use MDX statement like "return only those members/data where the value of some account is greater than 100".
Thus allowing you to select for instance those entities that had signinficant sales or the like.
In EVDRE i am looking for a way to do the same but apart from returning the Top n members or suppressing zero's i cannot fnd a way to do this. From an earlier post in the old outlooksoft consultancy forum (dating from march last year) i understood that this functionality was already prepared so i assumed it is in, but how ???? (if it is there of course).
I hope some of you have the answer.....
Thanks,
Edwin van Geel (SAP Netherlands)Maggie, I think what David's answer implies is this:
You can't (now, 5.1) use EVDRE to do a suppression based on signeddata.
You can either build your entire report with EVENEs for the expansion, and EVGETs for the data retrieval (basically use the wizard templates) or use an EVENE for the expansion and EVDRE to only retrieve the data. The second option's a bit more complicated to set up, but likely the better approach in terms of performance and future-proofing.
Either way, in the EVENE you use the MDX filter, both to evaluate the data values, and the other filter requirement you have. -
Retriving records with the date and time stamp
I need to get all the records that were update between 08:36:06 AM and 8:36:09 AM on the12/15/2009
I am using this query it is giving me the right numbers (I think) because this condition GURMAIL_CPLN_CODE = 'UGAP', I would like something more
precise using the date and time stamp with the dates
12/15/2009 08:36:06 AM
12/15/2009 08:36:07 AM
12/15/2009 08:36:08 AM
12/15/2009 08:36:09 AM
select * from GURMAIL
where
PERMAIL_CPLN_CODE = 'UGAP'
AND TO_CHAR(PERMAIL_ACTIVITY_DATE,'MM/DD/YYYYHH24:MI:SS AM') >= '12/15/2009 08:36%'Thank youYes, but HH24 and AM cannot be used together:
SQL> select to_date('12/15/2009 08:36:06 am', 'mm/dd/yyyy hh24:mi:ss am') from dual;
select to_date('12/15/2009 08:36:06 am', 'mm/dd/yyyy hh24:mi:ss am') from dual
ERRORE alla riga 1:
ORA-01818: 'HH24' impedisce l'uso dell'indicatore meridianoUse this:
select *
from gurmail
where permail_cpln_code = 'UGAP'
AND permail_activity_date between to_date('12/15/2009 08:36:06', 'mm/dd/yyyy hh24:mi:ss')
and to_date('12/15/2009 08:36:09', 'mm/dd/yyyy hh24:mi:ss')or this:
select *
from gurmail
where permail_cpln_code = 'UGAP'
AND permail_activity_date between to_date('12/15/2009 08:36:06 AM', 'mm/dd/yyyy hh:mi:ss am')
and to_date('12/15/2009 08:36:09 AM', 'mm/dd/yyyy hh:mi:ss am')Max
[My Italian Oracle blog|http://oracleitalia.wordpress.com/2009/12/18/table-elimination-oppure-join-elimination-lottimizzatore-si-libera-della-zavorra/]
Edited by: Massimo Ruocchio on Dec 23, 2009 12:05 AM -
I am comparing two date fields from two tables. Both are in DATE format. The dates look like this: 22-Apr-2006 07:00:10 AM and 01-Jun-2007 12:00:00 AM. I am adding this statement to a WHERE clause:
and vendors.vend_obsolete_date > document_xref.acceptance_date;
In this particualr case, I should get no result because the 1st date came before the 2nd date. But when I run my program, it seems to be ignoring my > statement. Is using a greater than sign the proper syntax to compare if the 1st date field is bigger (came after) another?
Thanks!Greater than works on DATE columns, no problem. A simple test confirms it.
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 9 17:50:52 2007
select 'oops, something is wrong' as result
from dual
where
to_date( '22-Apr-2006 07:00:10 AM', 'dd-Mon-yyyy hh12:mi:ss AM' )
> to_date( '01-Jun-2007 12:00:00 AM', 'dd-Mon-yyyy hh12:mi:ss AM' )
no rows selectedThere must be something else about your query or data that's causing the anomaly.
Joe Fuda
SQL Snippets -
Select Records between Begin Date/Time and End Date/Time
Hi, I need to select records from table GLPCA where the CPUDT and CPUTM are between a START DATE/TIME and END DATE/TIME.
I have the below logic from an SAP Solution, but it doesn't seem to be working right in my opinion. It is picking up records earlier than the date ranges. Can anyone tell me how I might be able to accomplish this? I'm hoping this is an easy one for the ABAPPERs...
Thanks,
START DATE 20091022
START TIME 125736
END DATE 20091022
END TIME 135044
CPUDT 20091022
CPUTM 100257
SELECT * FROM GLPCA
WHERE ( CPUDT >= STARTDATE AND ( CPUTM >= STARTTIME OR ( CPUDT <= ENDDATE AND CPUTM <= ENDTIME ) ) ).Thank you all! I ended up using the following:
SELECT * FROM GLPCA
WHERE RYEAR IN L_R_RYEAR
AND ( ( CPUDT = STARTDATE AND CPUTM >= STARTTIME ) OR CPUDT > STARTDATE )
AND ( ( CPUDT = ENDDATE AND CPUTM <= ENDTIME ) OR CPUDT < ENDDATE ).
This child was born from the following thread that was found:
update date and time of client record
Maybe you are looking for
-
I sent the letter below to RIM and it auto bounced back to me with a multitiude of useless options to choose from. Is there a person with logic and common sense that will veiw a letter to the company or is a dead end. To whom it may concern: I am wri
-
Change Checkbox status at runtime
Hi, I've got a question about checkboxes. How do I change the status of a checkbox from unchecked to checked (or vice versa) at runtime? How can I access it's values to say something like this: if (cond1 = true) then checkbox1 = 'CHECKED' else checkb
-
Cost for Enabling Plug-in for Acrobat Reader
Hi, I read the developer note and noticed if I want to enable my plug-in for Acrobat Reader I need "Visit the Adobe web site and fill out an Adobe Reader Integration Key License Agreement." I heard the cost is 100 US dollars per license. I am a bit c
-
Creating database and tables using datasources in a portal application
Hi All, <b> I have created a datasource using Visual Administrator. Now I want to create a database and then tables using this datasource. I have todo this in the portal application. How to create a database and then tables into this database???? </b
-
Java IO Error, not sure why.
Okay, these three classes are.. well.. basically non-existant, so I feel no reservations at posting them here. Please, someone, have a look and tell me why I'm getting an error in the child class. I'll post more further down. CLASS ONE import cs1.Key