Step 2 : Create a template
Purpose
The /HSEA/SZ_TEMPL_FUNC transaction is aimed to help you in managing the template files. It’s a customizing transaction but it requires not necessary a transport ! So you could execute it directly in your productive system.
Important : for a BAPI allowing to import data in the system, we recommend to test every change in Quality and to import the template changes in Production. If Aliases are used, it easier to transport the template.
Integration
You start from an activity and that activity refers to some BAPI. The BAPI processes data from one or more tables you manage here.
Or
You start from an Table ID and that Table ID refers to some Table. In fact, here you directly select the table fields you want to export and the fields you want to use as filter.
Prerequisites
An activity must exist beforehand and it must refer to an existing BAPI or table/view.
Two cases :
- You use a predefined activity delivered with the SEAzam package : in that case, you could use the template files delivered with the package too .
- You start from scratch in a new activity : you have to carefully manage the tables structure and the relationships between tables. Please examine the BAPI documentation directly available from the transaction detailed screen.
Let's start !
1_ You will find it in the transaction in the IMG menu. Or it is also possible to call it directly /HSEA/SZ_TEMPLATE.
2_ You select the activity you want to use to create the corresponding template by clicking there.
3_ System shows a tree structure on the left side of screen : it’s the activity structure. Several columns are shown with checkboxes dedicated to activate the fields of tables of your template.
1/ table names (folders) and fields names (individual items) : they are defined by the BAPI whose name is shown in tree’s top line. This cannot be changed.
allow to expand or collapse the field tree.
2/ the system shows the Key field of the table. This cannot be changed.
3/ ‘Import’ : you flag the fields you intent to upload from external local file in order to filter the Table ID’s process. Each checkbox actual value – before change thus – is shown close to the field. This can thus be ‘blank’ or ‘X’.
4/ ‘Formula’ : you flag this field if you want to schedule background jobs taken a date and a time into account.
5/ ‘Convert in’ : when flagged, deactivates the SAP data/format standard conversion of the field during import.
6/ ‘Export’ : flag here the fields you want to export to local template file.
7/ ‘Convert out’ : when flagged, deactivates the SAP data/format standard conversion of the field during output (refer to data dictionary for more details).
8/ ‘Short description’ : of field in current table (data dictionary), not changeable.
9/ ‘Parameter type’ , not changeable.
A/ ‘Alias in’ and ‘Alias out’ : name of alias if any (this would appear in template file at export by system). Double-click here to change.
B/ ‘Reuse’ : to be flagged when the value of this field will be reused by the next activity
NOTE : See Monitoring if you want to export the log fields.
4_ If you double click on a field in the first row, you will be allowed to give this field an Input and an Output alias.
This button allows to copy the structure of an existing activity using the same function/BAPI.
This button allows you to import the structure of an existing file.
Important : If the goal is to run a background job, it isn’t possible to use a XLS format. The template format does not define the export format. The export format is defined at the execution of the activity.
5_ When you selection is done, that the fields you want to use are selected, you can generate the file in 5 different formats (XML, JSON, KLS, TXT, CSV).
Important : If the goal is to run a background job, it isn’t possible to use a XLS format. The template format does not define the export format. The export format is defined at the execution of the activity.
- This button allows to transport your template structure to another system.
NOTE : Use transport when alias names are used in different systems, otherwise, the target system will not recognize the fields. Be also careful, only the last saved alias will be recognized. When changed, the previous is overwritten.
- This button shows the documentation of the function.
It allows you to choose the available language :
- This button shows the XML template file as flagged.