Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Date of last run of any program

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hiii

you can write a code for getting last date run of any program like given in following link

regards

twinkal

8 REPLIES 8

vinod_vemuru2
Active Contributor
0 Kudos

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.

0 Kudos

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

0 Kudos

Hi,

Try out in t-code 'st03n'

Former Member
0 Kudos

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.

Former Member
0 Kudos

hiii

you can write a code for getting last date run of any program like given in following link

regards

twinkal

Former Member
0 Kudos

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.

Former Member
0 Kudos

hii

refer to following link..it is having code for getting last run date of any program.try using it.i think it will solve your problem.

regards

twinkal

Former Member
0 Kudos

Hi Ullas.

I would like to suggest,

Check - Table - REPOSRC - Report Source Code

I would like to suggest a couple of references,

[SDN - Reference - Last Run Date & Time |;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave