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: 

last time batch job has run

Former Member
0 Kudos

hi

i have a report program which as date and time as parameters. i am scheduling this as batch job. i want to make the scheduling dynamic which means once the first batch job is finished, the next time time program should run with the values of last batch run date and time. is it possible to do this in the variant creation or we need to do it in the program.

thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi sudhakar,

in the initialization event of your code,

you can fetch the job details from TBTCO or TBTCP, you can also get it from view V_OP.

after the select you can get the latest record of that job and pass the details accordingly to your selection screen parameters.

hope this is helpful

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can hadle this in the program itself. In the INITIALIZATION event of the report, assign the date and time parameters to the last batch run date and time.

You can have a look at these tables to fetch the last run date and time of the batch job.

TBTCA Subsequent relationship in batch job scheduling

TBTCB Preceding relationship in batch job scheduling

TBTCI Usage counter for the job's internal report

TBTCO Job status overview table

TBTCP Batch job step overview

TBTCR Batch scheduler execution time

TBTCS Batch schedule table

Regards,

Vikranth

Former Member
0 Kudos

hi sudhakar,

in the initialization event of your code,

you can fetch the job details from TBTCO or TBTCP, you can also get it from view V_OP.

after the select you can get the latest record of that job and pass the details accordingly to your selection screen parameters.

hope this is helpful

0 Kudos

Hey,

How about scheduling the next job at the end of program itself. i.e Code can be written in End-Of-Selection of current program to schedule the next job with Date and Time (using syst) as desired.

Regards,

Nirmal