In order to prepare transactions for usage in jobs, the followings steps need to be taken.
SVSEDT has to be implemented directly or indirectly. For example, RPTBUT contains SVSEDT, so that all reports that use RPTBUT contain SVSEDT indirectly.
Normally, DATMOD should be used for handling date entries. Thus, one DATMOD instance per entered date field has to be linked into the transaction, the data field to be used for the selection has to be linked into this instance, and the panel of the instance has to be dragged on the screen.
In case GETs are used for selecting entries, the GET has to be initialized in the transaction via calls of the respective “RecReadRecord” routines, so that values entered in the job can be converted/processed accordingly.
When calling in the background it has to be ensured, that the transaction starts and also terminates automatically at the end. In transactions that use RPTBUT or RPTGEN, this is already implemented in RPTBUT. The technical start in transactions without RPTBUT can be done via “PostEvent” of the [Process] button and the “PostEvent” of the [Exit] button or via an asynchronous “Post” of a processing rule.
PLEASE NOTE: A synchronous “Post” (-1 as time argument) of a processing rule in the INIT leads to the fact that the Default rules are not executed first. This can maybe cause that the data fields are not initialized correctly if the system runs automatically.
Each relevant ATP entry has to be modified, so that the transaction supports the execution in a jobs.
If the transaction has to be controlled via Commandline Switches, the respective logic has to be implemented in the INIT of the transaction. This logic reads out the switches and transfers the values to the relevant data fields.
The transaction 'Count of entered Transactions' (CORPOS) can, for example, be considered as an example solution for a transaction where RPTBUT is used. Multiple date fields as well as a GET are implemented in that transaction.
To automatically launch a transaction in case of job operation the rule “IsAutostartRequested” should be used to determine that.
“
”
The module JOBMOD, which is used to launch jobs, uses command line switches to pass information to the target transaction to be used therein
-jobname The job name is primarily used in the target transaction to identify the value set to be loaded
-jobdispo The disposition might hold the value “exec” which signals the execution of the job opposite to the configuration of the job.