Calculating 60 days from last run date and sum a total for those 60 days
I need to calculate 60 days from last run date (I will create prompts), then take that number to sum a total of items.
Can someone be of assistance.
Hi,
You can create a calculation to calculate 60 days before your run date. e.g. if rundate is your date item then the calculation will be:
rundate-60
Rod West
Similar Messages
-
Create a listing of reports with last run date and # of times run
Hi All,
I want to create a listing of reports with last run date and number of times report is run in the past 18 months.
If anybody can please help me with the query for the same.
Regards,
Sk
Edited by: user10989244 on Aug 18, 2009 7:12 AMHi Sk
Assuming you have the collection of statistics enabled, which it is out of the box, you can get the information you need from the EUL5_QPP_STATS table. This script will help:
SELECT
QPP.QS_DOC_OWNER WORKBOOK_OWNER,
QPP.QS_DOC_NAME WORKBOOK_NAME,
QPP.QS_DOC_DETAILS WORKSHEET_NAME,
QPP.QS_CREATED_BY RUN_BY,
TRUNC(MAX(QPP.QS_CREATED_DATE)) LAST_USED_DATE,
COUNT(QPP.QS_ID) TIMES_USED
FROM
EUL5_QPP_STATS QPP
WHERE
QPP.QS_CREATED_DATE >= ADD_MONTHS(SYSDATE, -18)
GROUP BY
QPP.QS_DOC_OWNER,
QPP.QS_DOC_NAME,
QPP.QS_CREATED_BY,
QPP.QS_DOC_DETAILS
ORDER BY 1,2,3;
Best wishes
Michael -
My serial number is C38JL043DTWD but lose from last 3 week and 28 October expire for service and support coverage how can I claim?
Sorry, but I don't understand your question. If you are questioning the stated expiration date of your warranty, when did you buy the iPhone and from what dealer? You may wish to post in your native language if you are uncomfortable posting in English.
Regards. -
Last Run date and User name for a transaction
Hi All,
How to find the User who has last run a transaction?
I have searched the forum and the Tcode STAT and STAD doesnot help me. Any other pointers please.
ThanksThanks for sorting this out... please keep it civil (otherwise it will simple be deleted).
As far as I know, the problem here is the "translation" and "aggregation".
There are some good blogs on this if you use the search and read the other blogs.
Search terms such as "STAD" and "MONI" will help further (and not "flood" the search results).
There is no need for a flame war about this, and possibly no need for the original question.
My recommendation:
- A light and friendly introduction to "the search" and "the rules" is okay.
- A short tip on search terms and some infos which are helpfull or based on experience (not help.sap.com) are okay.
- If people are hard of hearing or abuse the forums => use the "Report Abuse" button.
Please respect the forum rules individually.
Cheers,
Julius -
Last run date & time & multiple files handling
Hi frnds,
i am working on an outbound interface in which i am retrieving data from custom db table,processing it with other db tables and writing the final output into a file into the application server and updating the custom db table.
Now i have an issue here when i am giving plant as input in selection screen (select-options), i should also get those plants from my custom table which have no last run date and time.
How to get that?
Next part of my question is for multiple plants entry,multiple files have to created in application server.
Presently, i have concatenated the file path n name.Do i need to loop the same with s_werks.Will it work
Also i used an internal table for update data storage.When multiple plants are their how to handle the updation.
Rgds,
SimranHi.
In ur reply i did'nt understood two things
1) this is how i'm doin the selection
select lt_run_dt
lt_run_tm
into table itab1
from z_table
where prog_name EQ sy-repid
AND plant IN s_werks
will it give me plants whose last_run_date and last_run_time are not in the z table?
2) If you are going with select-option from parameter, then if you have to write a FILE per PLANT. Then you can loop at plant->extract the data-> write to app server-update z table->end loop
Does that means:
loop at s_werks
open dataset
transfer
modify
endloop
Kindly clarify to solve this issue.
Rgds,
Simran -
Help find the Last run date from previous month
Hi all
I am stuck trying to find the Last Run Date from the previous month.
select distinct(date_ran) from TABLE X where date_ran like '%/11-%' order by date_ran desc gives
"03/30/11-06:19
"03/25/11-03:01
"03/24/11-03:00
"03/23/11-03:00
"03/22/11-03:00
"03/21/11-03:00
"03/18/11-03:00
"03/17/11-00:00
"03/16/11-06:31
"02/15/11-07:42
"02/15/11-06:00
"02/14/11-08:19
Here the result I am trying to acheive is 02/15/11-07:42 ;Note the column date_ran is a VARCHAR2(255) and not a TIMESTAMP
I tried
select ADD_MONTHS(to_date(max(date_ran), 'MM/DD/YYYY-HH24:MI'),-1)
from daily_tests_a
where date_ran like '%/11-%'
order by date_ran desc
which returns 2/28/0011 6:19:00 AM and that is not the result I am looking for
Regards
SMKWelcome to the forum!
user2931503 wrote:
Hi all
I am stuck trying to find the Last Run Date from the previous month.
select distinct(date_ran) from TABLE X where date_ran like '%/11-%' order by date_ran desc gives
"03/30/11-06:19
"03/25/11-03:01
"03/24/11-03:00
"03/23/11-03:00
"03/22/11-03:00
"03/21/11-03:00
"03/18/11-03:00
"03/17/11-00:00
"03/16/11-06:31
"02/15/11-07:42
"02/15/11-06:00
"02/14/11-08:19
Here the result I am trying to acheive is 02/15/11-07:42 ;Note the column date_ran is a VARCHAR2(255) and not a TIMESTAMPThat's a very bad idea. Points in time should always be stored in DATE (or maybe TIMESTAMP) columns. If not, you're going to waste resources converting them to DATEs whenever you need them to behave like DATEs, and risk run-time errors because of bad data.
Normally, the "previous" month means the month before the current month. In April, the previous month is March.
By "previous" month, do you mean the 2nd latest month in the table? That is, this data contains data from February and March, 2011; March 2011 is the latest of those months, February 2011 is the next-to-last, and so is that why you want a date from February?
I tried
select ADD_MONTHS(to_date(max(date_ran), 'MM/DD/YYYY-HH24:MI'),-1)
from daily_tests_a
where date_ran like '%/11-%'
order by date_ran desc
which returns 2/28/0011 6:19:00 AM and that is not the result I am looking for
Regards
SMKTry this:
WITH got_real_date AS
SELECT TO_DATE ( SUBSTR (date_ran, 1, 14)
, 'MM/DD/RR-HH24:MI'
) AS real_date
FROM table_x
-- WHERE ... -- If you need any filtering, put it here
SELECT TO_CHAR ( MAX (real_date)
, 'MM/DD/RR-HH24:MI'
) AS last_date
FROM got_month_num
WHERE real_date < (
SELECT TRUNC (MAX (real_date), 'MONTH')
FROM got_real_date
;Edited by: Frank Kulash on Apr 5, 2011 3:59 PM -
I purchased an iPad mini on October 10th. I want to return it and get the new ipad mini retina when it comes out. I am currently still within the 14 day return/exchange window but how can I exchange it if the new ipad mini release date isn't until "later in November", which would be beyond the 14 days from my purchase date? If apple announces a new version of a product you just purchased but won't actually release it for more than 14 days, how can you possibly exchange the one you just bought? Is my only option to return the one I bought on the 10th (so return by 10/24) and then not have an iPad until the new one is available for purchase? Or would it make any sense to return the one I bought, get a new one, which would presumably have another 14 day return window, and then exchange THAT one for the new ipad mini w/ retina when it comes out (hopefully within that second 14 day window)?
Call the apple store you got it from and ask them. Sometimes in the past they've extended the 'no questions asked return' but only Apple can tell you for sure.
-
Calculate number of days based on System Date and a date column!
Hi everyone,
I have a query to run a report where the results has a column named “Due Date” which holds a date value based on the project submission date.
Now, I need to add 4 columns named, “45 Days Expectant”, “30 Days Overdue”, “60 Days Overdue” and “90 Days Overdue”.
I need to do a calculation based on the “Due Date” and “System (I mean default computer date) Date” that if “System Date” is 45 days+ to “Due Date” than put “Yes” in “45 Days Expectant” row.
Also, if “Due Date” is less than or equal to system date by 30 days, put “Yes” in “30 Days Overdue” and same for the 60 and 90 days.
For example the output should be like:
Is this possible? Can someone help me how to write this Case Statement please? I have some answers how to do it in SSRS (Report Designer) but I want to get the results using T-SQL...Thanks heaps...cheers...
artistdedigitalHi Jay,
Thanks but those dates are just a reference. The actual table contains hundreds of date rows... so I guess this technique will not work (not sure though)...
I am quite cool with this bit:
select duedate,
case when days > -45 and days < 0 then 'YES' else '' end as '45 Days Expectant',
case when days between 30 and 60 then 'YES' else '' end as '30 Days overdue',
case when days between 60 and 90 then 'YES' else '' end as '60 Days overdue',
case when days > 90 then 'YES' else '' end as '90 Days overdue'
from cte--------------------------------------------------------------------------------------------------But can you please explain this bit a more? Thanks for being so prompt though : )declare @tab table (duedate datetime)
insert @tab select '04/25/2014'
insert @tab select '02/10/2014'
insert @tab select '01/10/2014'
insert @tab select '12/10/2013'
;with cte
as
select duedate,datediff(dd,duedate,getdate()) as days
from @tab
artistdedigital -
Does ODI keeps the record of last run date of interface?
Target:Oracle
Source:MS SQL
ODI:11g
My requirement is I have a source table, Whatever operations performed on that (like insert,update etc) table, I want to load those records into the target table. For that I have created an Interface which runs daily at 6 PM.While loading, I have put one filter which loads only those data which got inserted/updated on current date(GETDATE()).Suppose the case, If my ODI has been down(because of any reason) since 3 days. In this case I have no option to load the records who got changed in that three days. On the fourth day I start the ODI then, how can I get data which got changed in last three days.
Is there any place where ODI keeps the record of last run date or something of interface ?
If I use CDC in that case, once the ODI down then the journalism can not able to keep the changed data info.
How can I load the changed data into the target.?
Thanks,
ShrinivasIf you have a date column in source and target , I guess you might be having a you are using date , you can use a filter and write the expression like this
Source_date > (select max(date_created/update) from schema.target_table)
I have validated this expression and it validated by ODI , I did not try running it , please give it a shot
Suresh -
How to get the last run date.
We intend to develop an incremental data load mapping using this strategy:
1) The mapping reads the date it was last run from an auxiliary table.
2) It selects from the source only those rows that were inserted or updated after said date.
3) Then, a post-mapping process updates the last run date in the auxiliary table, using SYSDATE.
The problem with this logic is that there is a gap: if the mapping starts running at 1:00 and ends at 2:00, the rows that are inserted in between will never be loaded.
Is there any way to get the value when the mapping started running? Is there a better way to do this?
Any help would be appreciated.
Juan AlgabaThere is always the possibility of some record updates slipping through the crack if you are depending on dates unless you are very carefull. All of the audit tasks that the OWB-generate code performes take time. Any pre- or post- process that needs to run takes time. So which date is the best cuttoff point to equate to "when the last run of the merge (or insert or update) statement completed"?
Plus, how do you handle reloads if the previous load failed and your mapping had incremental commits?
Is your source on another server? If so, are the dates in perfect synch? The audit tables populate with sysdate of your runtime schema. Is that the same as the sysdate on your source remote database?
I would qualify my query to look for all updates since the start of the last run that finished successfully - adjusted if neccesary for sysdate differences if it is on a remote schema. And make sure that your code handles any reloads gracefully in the event that this brings back data that you have already loaded once. .
Because we use Oracle Streams to load a local staging area, we also have custom code to dump the primary keys of all data changes to utility staging tables while streams is updating the local copy. So, our Person table has an st_Person_delta table that just holds the primary keys that have been updated by Streams since the last ETL run.
During datamart load we disable the streams apply to stabilize our environment, and join these lists of pk's to their source tables to drive our ETL. So we only select data where Streams has performed an update to the row since our last run. When we are done our ETL, we truncate the primary key staging tables, and then turn streams back on to start loading up our new delta into our staging tables again..
The ETL gets pretty complex though when many tables join together in one mapping and you need to check all possible source table deltas to see if any of them got updated to determine the delta for a given dimension or fact record, but it works great once you get it all done. -
Last Logon date and Logon time not updating in table USR02
Hi,
Please help us on this. After customer successfully logged in the webshop, we are checking the table USR02 in CRM system and the Logon date and Logon time is not updated. Because of this, the customer will be locked after certain number of days. When we check it in ECC system, customer's last logon date and time is updated. Can you tell us what could be causing this? Any advise what we need to check? Thanks in advance!
Regards,
MikeHi
1. Please check if the USAPPLREF table in ECC has the correct mapping done between the LOGON User and the Sold-to party (Customer)
2. Please check the validity of those user in SU01 user data.
3. Please check the USERS data from the USERADMIN Link (if it is configured in your scenario through XCM settings for USERS)
Hope this will help.
Regards -
To find last run date of custom concurrent program in oracle apps
Hello Exports,
Can you pls tell me how to find last run date of custom concurrent program in oracle apps.( thr Backend query )
Thanks in advance,
Edited by: 981527 on Mar 7, 2013 3:01 AMtry the below:
select fcp.user_concurrent_program_name
,fcr.request_date
,fu.user_name
,fcr.actual_start_date
,fcr.actual_completion_date
,fcr.phase_code
,fcr.status_code
,fcr.argument1
,fcr.argument2
,fcr.argument3
from fnd_concurrent_programs_vl fcp
,fnd_concurrent_requests fcr
,fnd_user fu
where fcp.user_concurrent_program_name like 'Payroll Run'
and fcp.concurrent_program_id = fcr.concurrent_program_id
and fcr.requested_by = fu.user_id
order by fcr.actual_completion_date desc -
How to find the last run date of the report..
please any one one help me
how to find last run date of the report...
for example if my report is zgrir...if i am exuted in last week
if want to find when it executed
last run date is req
please any one help me...The trasaction stat is limited because i want all the execution date even if it is 3 years ago.
I have tryied the transaction st03 but it is limited to 3 months ago.
check transaction STAT and it's report RSSTAT00.
U can copy RSSTAT00 into ZRSSTAT00 and modify corresponding.
*& Report ZDSAP *
REPORT ZDSAP .
DATA: d_ref TYPE REF TO data,
d_ref2 TYPE REF TO data ,
i_alv_cat TYPE TABLE OF lvc_s_fcat,
ls_alv_cat LIKE LINE OF i_alv_cat.
TYPES tabname LIKE dcobjdef-name .
parameter: p_tablen type tabname.
data: begin of itab occurs 0.
INCLUDE STRUCTURE dntab.
data: end of itab.
FIELD-SYMBOLS : <F_FS> TYPE table,
<F_FS1> TYPE TABLE,
<F_FS2> TYPE ANY,
<F_FS3> TYPE TABLE.
REFRESH itab.
CALL FUNCTION 'NAMETAB_GET'
EXPORTING
langu = sy-langu
tabname = p_tablen
TABLES
nametab = itab
EXCEPTIONS
no_texts_found = 1.
LOOP AT itab .
ls_alv_cat-fieldname = itab-fieldname.
ls_alv_cat-ref_table = p_tablen.
ls_alv_cat-ref_field = itab-fieldname.
APPEND ls_alv_cat TO i_alv_cat.
ENDLOOP.
internal table build
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = i_alv_cat
IMPORTING ep_table = d_ref .
ASSIGN d_ref->* TO <F_FS>.
SELECT * FROM (p_tablen) INTO CORRESPONDING FIELDS OF TABLE <F_FS>.
LOOP AT <F_FS> ASSIGNING <F_FS2>.
*your code goes here.
ENDLOOP. -
How to know last run time and who ran the query
Hi
I am doing the analysis for all the queries , their last run time and who ran the query
Since there are almost 6000 queries , is there any way to find out last run time and who ran the query
in one step or through any transaction else It would huge effort taking task to check the data in BW statistics
table for each query
Regards,
VivekHi,
Statistics should be switched ON for all the queries first. You can check this in RSDDSTAT.
Statistics data is stored in BW for a specific period only. This setting can be maintained in table RSADMIN (Field : TCT_KEEP_OLAP_DM_DATA_N_DAYS). If the value for the field is 30, then 30 days old statistics will be available at any point.
Not all the queries will be ran daily. Some are ran daily, monthly and yearly depending upon User requirement.
1. You can check in RSDDSTAT_OLAP for the details you needed.
2. You can install the BI Technical Content and run the respective query for the details you needed.
Hope this helps.
Regards,
Sunil -
Publication with WebI report including all transactions from last run
Hi,
using BOE XI R3 FixPack 4.
I want to create a WebI report that should include all data newer than last run time for the publication.
How do I get last run date for a publication or WebI report?Hai,
Along with Java version you can also take of refreshing data properly.After modification remove everything from the report and again drag data from data tab into the report.
Maybe you are looking for
-
Where can i buy a new MSI Fan 8cm for HD5770?
Hi Team! I would like to ask where can i buy a new 8cm fan for my 5770 VGA card? Although the card is still under warranty, but the Hungarian dealer guarantees the absence of a sticker, he can not receive and send the MSI Central service!? My client
-
Internet (voip/SIP) calls on N97
Hi, I was using Internet calls feature on N95. On N97 the only thing what I was able to do is to define SIP profile. It is defined. I am able to register to the SIP server ... but no way to use this server for Internet Calls. I simply do not have pos
-
HELP!!! My blackberry is really slow and the battery doesn't last for long
Hi everybody, I hope very much you can help me! Since one week I have real trouble with my blackberry tour! I have bought only a year ago in the US and no warranty as I live in Germany.... It started that I had - a temperature scale is on my devise,
-
When I try to open messages in FB, it just sits there loading...I have FF 8 with ABP. If I disable ABP the messages load, I hate the ads.....any help? Also, what happened to my multiple back button? Sometimes I want to go back multiple pages and I am
-
While Loop in Service method.
I have a while(true) loop in my doPost method of my servlet, basically to cut a long story short it is needed in there. The problem is when a user leaves the page this loop is still running. I need it to stop running as it is consuming resources, is