Excel import and export of object master data

With the BatchMan reports you can simplify important work steps in the Workload Automation in SAP. Last time we introduced you to the TXV report for the automatic transfer of variables. This article gives you a short overview and documentation for exporting and importing Excel files.


Purpose and use of the BatchMan report for Excel

With the report /BTCMAN/M_EXG you export the master data of jobs and networks from BatchMan into an Excel file or import data from an Excel file into the system. This offers the following possibilities, for example:

  • the simple matching and corrections e.g. for the department,
  • the instant duplication of processes, so company codes such as plants can be duplicated with an immense time saving and in a simple way
  • or mass changes that can be applied to any field in the Excel file.

This report is available from BatchMan version 5.1.4 and is called up as follows via SA38/SE38 in SAP: /BTCHMAN/M_EXG


When exporting a network, its network objects are also exported, i.e. also the contained jobs and subordinate networks.

Note: Since the master data is transferred completely to an Excel file during the export, this process can lead to runtime errors and program aborts if large amounts of data are exported. Then the export should take place with limited object selection or be scheduled as a job in the background.

Export as Excel file

Screenshot BatchMan Export as Excel file
Export as Excel file

You can select these objects for export:

  • Jobs
  • nets
  • Jobs and nets

When exporting the nets, the net objects are also exported – the jobs and the child nets.

  • In the Object name input field you can select with wildcards *.

The Excel file can:

  • be saved locally.
  • to be saved on the server.

Without path specification the file is created in the default directory.

  • only be displayed.

The Excel file is created and displayed, but the file is not saved.

  • be sent by mail.

screenshot batchman save option of excel export
Saving options of the Excel export

Structure of the Excel file

Screenshot BatchMan structure of excel tables
Structure of BatchMan Excel tables

  • The first two rows of the Excel table are technical rows and must not be edited.
  • Column A Network maintenance/OBJNAME is a key column and must not be deleted.
  • Column B Object/OBJTYPE is a key column, must not be deleted and the values must not be edited.

Note: If you only want to edit certain objects, you can delete the other columns of the Excel spreadsheet except for the columns of the edited group and the key columns Network maintenance/OBJNAME and Object/OBJTYPE. When importing, only the existing columns will then overwrite the respective data in the database, and the master data will be retained for all deleted Excel columns.


Example:


You want to edit the Excel field OBJ_TEXT in the Network data group. Then

  • keep the first two key columns Net maintenance/OBJNAME and Object/OBJTYPE,
  • keep all columns of the group Net data
  • and you can delete all other groups and columns.
Screenshot BatchMan Network data group with expanded columns of object data
Network data group with expanded columns of object data

  • The columns with object data are grouped, in the first row the group names are displayed. For a more detailed view you can expand the groups.
  • The rows contain the objects, which are also grouped and expanded. For a better overview you can collapse the objects.
Screenshot BatchMan Tooltip of field
Tooltip of the field names shows the menu path in BatchMan

  • The second line shows the field names of the BatchMan tables. In the tooltip you will find the information where in BatchMan you can find the field in master data maintenance and how it is named in the GUI.

Example:


The OBJ_TEXT field in the Excel file can be found in BatchMan under BatchMan > Master data > Maintain networks > General data > Field description

Import Excel file

Screenshot BatchMan Import Excel file
Import Excel file

Various import methods are available for data import. The data can be imported

  • without test
  • With test

For both methods, you decide whether existing objects may be overwritten by selecting the field Overwrite existing objects. Overwrite objects or not.


To check your Excel file first without import, select the option

  • only checked, without import

Import without Check

Screenshot BatchMan Import without checking
BatchMan Log Import without checking

The data from the Excel file is imported into BatchMan without checking. After the import, a short log is generated. In this protocol it is indicated that an object was changed. If there are errors (message type E), they are not shown in detail. In this case you have to perform the import with check.


By clicking on the object name (hotspot click) in the log, you jump directly to the respective master data. The object can be checked or manually edited.

Import with check

Screenshot BatchMan log after file import with check
Screenshot BatchMan log after file import with check

The data from the Excel file is imported into BatchMan with checking. After the import, a detailed log is generated. If errors have occurred, they will be listed in detail.


By clicking on the object name (hotspot click) in the log, you jump directly to the respective master data. The object can be checked or manually reworked.

Check only, no import – the data from the Excel file will be checked, but not imported.

Screenshot BatchMan log checking an Excel file without importing
log after checking an Excel file without importing a file

After the test, a detailed log is displayed.

With the report /BTCHMAN/M_EXG, Excel files can be exported as well as imported. Use this help to make your daily work in job scheduling easier. For more help and updates from the world of workload automation, take a look at our other dev blog posts or our news.

Would you like to try out the report yourself? In the upcoming article next month, we will explain how to export and import the report using a concrete exercise example with a net in BatchMan. Stay tuned!