2008 Jul 31 9:23 AM
Hi Experts,
Can anyone please provide how to fetch Date of last run of any program.
I tried for transaction STAD/STAT,did not get desired Results.
Any table name / FM in this regard will be helpfull.
Thanks in Advance.
Regards
Ullas
2008 Jul 31 9:39 AM
2008 Jul 31 9:35 AM
Hi Ullas,
Not sure of table/FM. But i can give a pointer.
Create one Ztable with mandt, date and time. Only mandt is key here.
In ur program once u finish all selection screen validations just query this Ztable.
SELECT single * INTO wa.
Here u can get the date and time.(First time there won't be any record).
In the last statement update this table with current date and time.
wa-date = sy-datum.
wa-time = sy-uzeit.
MODIFY ztable from wa.
Why i am asking to do it in last is ur program may fail in between. So if it reaches till the end of execution where there are no more statements to be executed MODIFY the ztable.
So at any point of time u can get the successful execution date and time of the report from this table for the given client.
If u don't want to happen at client level then u can remove the mandt field from table.
Hope this may be helpful.
Thanks,
Vinod.
2008 Jul 31 9:41 AM
Hi Vinod,
Thanks for your Reply.
Already Programs are Exsisting and i need to track the Last Run Date of these programs in last One year.We are in the process of collecting the data as what has happened to these programs over a period of time.
Regards
Ullas
2008 Jul 31 9:45 AM
2008 Jul 31 9:35 AM
Hi Ullas,
Check the following table that will consist of programe details.
FRUN - Run Date of a Program.
Hope it is helps.
Regards,
T.Durai murugan.
2008 Jul 31 9:39 AM
2008 Jul 31 9:45 AM
Hi,
Use the Table TRDIR
Fields:
NAME -- ABAP Program Name
CNAM -- Author
CDAT -- Created on
UNAM -- Last changed by
UDAT -- Changed On
Hope this helps.
thanx,
dhanashri.
2008 Jul 31 9:53 AM
2008 Jul 31 9:56 AM