Eddie Monster
11th March 2002, 19:36
Our finance department runs two different baan reports seven times each (two reports for each of our seven divisions). I have set them up to run in Job Managment, but I will need to re-create the job each month because the report's selection criteria will change each month (ending period and year). Is there any way to update the selection criteria? Or will I have to continue creating a new batch job with 14 detail jobs everymonth?

Any suggestions would be greatly appreciated!

patvdv
11th March 2002, 19:40
Eddie,

You can use relative dates in your selection criteria, that might help: e.g: +60 means +60 days from system date.

Otherwise you can hack into the selection data that is stored in table ttaad503 (Job Input Variables). But be careful when using GTM!

Nick Cooley
13th March 2002, 05:32
Eddie,
We had a similar issue to you, where by the period for a financial report needed to be changed that was run by a job.
Instead of using GTM to change the ttaad503 table, we wrote a session that queried the job id and allowed the parameters to be changed. This meant the job itself never had to be cancelled, updated and placed back in the queue.
One thing to watch when changing the values in this table, is that the first part of a parameter indicates it's length, therefore something like 019cuno.t:="ZZZZZZ", the 19 is the length of the parameter. If your parameter is a period, then the size can vary, as a period can either be single or double digit. For example
016period.f:="2", would become 017period.f:="10". the 16 changes to 17 as we have an extra digit.

Regards,
Nick

Eddie Monster
14th March 2002, 17:55
Thanks Nick.

Would you be able to e-mail me some of the code so that I can take a look at how you queried the job id?