Use of batch jobs
Batch jobs are the easiest way to run tasks according to a specific pattern. This could involve importing data from different tables in a specific order, or completely automating recurring tasks, such as creating and sending a specific report at a specific time.
Such a batch job can therefore take on many different tasks.
The name batch job comes from the fact that within such a process several tasks are processed one after the other, like with a stack of paper where someone works from top to bottom.
The examples listed here are the most frequently used to date. Users are also free to combine additional tasks into new jobs.
The menu item for batch jobs can be found in the configuration:

2. Automatically create and send reports
One way to use batch jobs is to create and send reports at a specific time .
To do this, in the batch job, in the “Rows” tab, the type of batch job is set to “ Report ( InMemory )”.
Then, in the “ Detail Job ” field, select the report to be executed.
It is important that the report is configured for export to Excel (“Excel Download” checked in the report schema, “Excel save file” field filled with a path and file name).

Then the item “Generation of Excel file ” must be entered.

Data imports are a prime example of a batch job. Multiple imports can be processed consecutively.
As more and more information and thus more data imports accumulate on a system over time, the daily data import sometimes becomes confusing when master data (dimensions) and transaction data are processed in the same batch job.
In particular, there is a risk that if the steps are carelessly inserted into an existing batch job, the transaction data will suddenly be transferred before the master data.
To avoid this, a concept that has proven successful is to separate the master data from the transaction data and to create a separate batch job for the master data and one for the transaction data.
To create a data import job – regardless of whether it is master data or transaction data – a new row is inserted in the “ Rows ” tab.


In the " Type " field, select " Data Import " as the type, and in the " Job Details " field, select the desired data import. This completes the setup. The import will then be executed when the batch job is run.
An important step to gain clarity is to nest batch jobs. This allows interdependencies between different batch jobs to be resolved with a single scheduling control .
An example of this is the daily data import.
Now that a batch job has been created for the master data imports and a batch job for the transaction data imports, a third batch job is created for execution control.
Two lines are now created in the Lines tab:

For both, select " Batch Job " in the " Type " field. In the " Detail Job " field, select the name of the master data job in the first line , and the name of the transaction data job in the second line .
Since it makes no sense to specify a period for filling when loading master data, which is mainly dimension loading, as dimension loading ignores this, the date range in the form of the date formulas for the from and to dates remains empty.
When it comes to transaction data, however, it is necessary to specify a date range, also in order to keep loading times within a tolerable range.
In this example, the time window for the transaction data import was assumed to be 2 months before the current month to 1 month after the current month.
Because the date formula has been passed to the batch job, this time range applies to all individual steps within the batch job. A separate definition for each individual data import is no longer necessary.
Another possible application for nesting is to create a job for reorganization, a complete reimport of the data. For this purpose, a batch job is created that contains the import job to be executed. This is the detail job.
Then another batch job is created that calls the detail job 12 times, each time with a different date formula.
Finally, a batch job is created that calls the monthly job. In this batch job, a row is created for each year to be imported, which starts the monthly job. Instead of the date formula, however, the hash symbol followed by January 1st of the year to be imported is entered in the FromDate date formula field (e.g., "#01.01.2019"), and the hash symbol followed by December 31st of the same year is entered in the ToDate date formula field (e.g., "#12/31/2019").
The hash symbol in front of the date means that this is a fixed date.
This has resulted in an easily maintainable job that can import data monthly for several years and in which the import job can also be replaced without great effort.
A special example of a batch job is allocations. These are calculated and posted through the orderly execution of one or more posting keys.
To do this, after the posting keys have been created and configured, a new batch job is created. The "Posting Key" type is then selected as the type in the rows. There are two variants: the " Posting Key (Single) " type executes only a single posting key. The " Posting Key (Multi) " type, on the other hand, can start multiple posting keys.
The posting key or the search text for the posting key is in the “Detail Job” column:

In this example, the first posting key could have been grouped with the type " Posting Key (Multi )" and the search text "ILV-*." The found posting keys would then have been executed alphabetically.
However, this was omitted here because, in addition to posting keys that distribute according to a fixed scheme, those that only calculated the distribution (variably) at runtime were also used. These had to be executed alternately with the fixed-distribution keys in a specific order.
This allocation calculation is carried out in the same way as any other batch job.
There are several ways to run a batch job.
One possibility is to have the user run a batch job via a report on the web.
Finally, there's the option to schedule the job to run automatically. This requires a few additional settings.
5.1 Manual execution from the web report
Each report on the web can be assigned multiple batch jobs, which can then be executed by clicking on the buttons in the report.
These are particularly popular for imports from Excel. Users no longer need to access Navision, but can start the batch job(s) via the web report.
To start a data import from Excel from a report, a separate batch job is created for this data import.
The report schema of the report from which the import is to be started is then opened.
In the menu bar of the report schema there is a button “Executable Jobs”:

Clicking this button opens the list of batch jobs stored in this report:

A short text can be entered in the "Description" column, which will then be displayed in the menu in the web report. If this column is left blank, the name or description of the batch job will be displayed in the menu.
The "Job Type" column tells the system what type of job this is. The types used here are Calculation and General or File Import. File import is always selected when the data source is a file. General import is responsible for importing from other tables or databases.
The batch job to be executed is entered in the “Executable Job” column.
Finally, you can select the icon with which the job should be displayed in the menu. This is particularly useful if there are multiple jobs in a report that should be distinguished by their icons.
In the web report, the import will then be displayed in the top right menu (three horizontal lines). Depending on the job type and the assigned icon, different icons will appear here:

5.2 Recurring, automatic execution
For a batch job to run automatically, the following one-time setting is required. This is usually done when setting up the Controlling module.
In the Controlling module, a user “ TIMER ” must be created in the user setup and the checkboxes “Admin.” and “Super Administrator ” must be checked.
This user is then used by the system to automatically execute the batch jobs. In order for the system to complete all tasks defined in the batch job, the user must be a super administrator. Otherwise, the system may be unable to perform certain tasks due to insufficient authorization.
In order for the batch job to run automatically at a specific time, the times at which it should run must be specified. This is done in the batch job itself:

5.3 Protocol
The results of the batch job and its individual steps can be accessed via the "Log" button in the menu bar. The execution history is loaded and displayed in a list. The most recent entries are located at the top of the list.
If you click on an entry and then click the "Detailed Log All Levels" button, you'll see all the results of the individual execution steps. This allows you to check whether any intermediate steps encountered problems or whether all of them completed as expected.


In order to check the result of the execution of a batch job, there is an execution log for each execution of each individual work step.
This log can be found under Configuration under the Batch Jobs button; here a log of only the selected batch job appears or an overview of all batch jobs under Configuration under Log .
Detailed log : To access the log, first click on the desired job. Then, you can open the log by clicking the "Log" button in the menu bar:



Log of all batch jobs:

Here is an overview of the individual executions of the respective batch jobs:

From this you can see when and for how long a job ran and whether the execution was successful or not.
If an error has occurred, it will be displayed in the Error Message column.