09-21-2009 7:13 AM
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
09-21-2009 7:33 AM
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
09-21-2009 7:22 AM
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
09-21-2009 7:33 AM
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
09-21-2009 7:44 AM
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