Refer to documentation Implementation
Presentation
An import/export template is identified by an alphanumeric code. Other than a title, two tabs are used to define the technical characteristics of the template.
Close
Fields
The following fields are present on this tab :
| This code identifies the import-export template. |
| It used to define a name associated with each record. |
| This check box is used to activate or deactivate the current record without losing its content. A deactivated record cannot be used (by calling its code) in other records (documents, setups, etc.) or during mass processings. The authorizations for a given function can prohibit the creation of an active record. In this case, the box is cleared by default and it can only be modified by an authorized user or via a signature circuit defined by Workflow. |
Close
Presentation
This tab defines the general characteristics of the template, that is to say :
Close
Fields
The following fields are present on this tab :
General
| It Indicates the object code to be imported or exported. In the case of export, this field is optional; the main table name to be exported is indicated in the identifying block. |
| It is used to initialize the context (especially if the same object is used by several functions) and check the access rights. Indeed, users must have the appropriate rights to access the function to be able to use the template. This field is mandatory. |
| Module belonging to the setup. This field is used to specify whether the screen has to be created in the folder database. It is specified when the module linked to the screen is active in the folder. |
| An activity code is used to:
In this way, if the activity code is disabled, the marked element will not be useable, and the associated code (if any) will neither be generated nor can be activated. |
| This access code is used to to limit access to the current record for certain users. The execution right associated with a user code is processed in a particular way in the case of the import-export templates : if a user has not been granted the execution right, they cannot use the template to import or export data. |
| It defines the standard process which includes the labels of those actions called in the import-export processes. These processes are used to carry out initializations, additional controls and, if required, updates. The structure of such a programme can be found in the technical appendix. It should be noted that the standard processes usually named IMPXXX, XXX being the import code, are supplied for a certain number of imports. For additional information on these actions, refer to the corresponding appended documentation. |
| It defines the specific/custom process which is called before the standard process, and which is used to carry out the same actions by de-activating if necessary what is carried out by the standard process. The possible actions are, among others, initializations, additional controls and updates, if required. For additional information on these actions, refer to the corresponding appended documentation. |
Structure
| It defines the structure used to manage the data in the file to be imported or exported. For further information, refer to the corresponding paragraph. |
| It defines the separator between two fields. To enter a non-printable character, it is necessary to enter a '\' (back slash) followed by 3 numbers representing the ascii code of the character in decimal base. |
| It defines the separator between two records (data groups). To enter a non-printable character, it is necessary to enter a '\' (back slash) followed by 3 numbers representing the ascii code of the character in decimal base. The following is often used :
|
| The field delimiter (usually the character ") is added in the first and last position for alphanumeric fields. For numeric and date fields there is no requirement for a delimiter. It is usually one of the following characters :
|
| It defines the format of the characters used in the file :
|
Export
| If this field is checked, it will be possible to use this template in the export of data. |
| This field, only displayed, stores the value of the sequence number when the last export took place. When performing chronological exports, this is useful to process only what has been modified since the last export took place. |
Transcoding
| When the ascii character set is being used, it is possible to use various standardized formats :
|
| It defines the decimal separator used for numbers. If this field is empty, the system will consider that the decimal separator is '.' (full stop). |
| It defines how the date type fields are coded (order and number of characters for the year). Only the order of characters and the number of characters in the year can be specified. On the import, any separation characters between fields are filtered ; in this way, the dates in the form 29-05-59 or 09/04/1991 are correctly decoded. The decoding sub-program takes into account the engine adxdcs variable, doucmented via the DCS parameter that is found in the general parameters in order to define the manner in which a year is decoded over two characters. DCS represents the "pivot" year that defines the century change. For instance, if DCS is set to 1940, any year made up of two numbers less than or equal to 40 will be considered to be part of the 21st century and any year greater than 40 will be considered to be part of the 20th century. It will therefore be possible to express the years between 1940 and 2039 with two numbers. |
| Title associated to the previous code. |
| The fields of type "local menu" are stored under the form of a number representing their rank in the table. According to the value of this field the template will export (or expect to find in import).
Taking into account the fact that the local menu titles are only the labels used in display, the value stored in the database being the rank in the table, it is entirely possible to change the title of the local menus at the time of an import, in order for the search algorithm to operate correctly. However be aware that the fact of changing the local menu titles can only be made in single user mode, also it is not designed for regular or automatic transfers. |
| Title associated to the previous code. |
Import
| If this field is checked, it will be possible to use this template for the import of data. |
| It makes it possible to modify an already existing record during import. |
| When this box is checked, the data import feeds the import-export storage space with the wrong data. The fact that the storage space is fed does not prevent the creation of an error file. |
| It indicates that the data integration into the database is made using specific/custom actions defined in the process whose name is given in the Import process field. This specific/custom process includes a restricted number of entry points and therefore requires the writing of a process including all the controls that should be carried out. Its use resides in the fact that it is possible to group the controls in order to optimize the import program. The structure of the specific/custom imports is described in appendix. The following actions, among others, should be found :
|
|
Table Identifiers
|   |
| It defines the group's overlapping level. Level 1 is the main level, a N+1 level defines a sub-level of the preceding N level. |
| It identifies the group by a code containing a maximum of 5 characters, this code will be mentioned in the field grid of the following tab, and in the file itself, as group header. |
| This indicator grid defines the structure of the record groups. Refer to the corresponding paragraph. |
| It defines the key of the linked table used to access the detail of the group records, from values of the upper level tables used in the link expression. |
| It defines the link expression, in other words, a series of values separated by a semicolon which gives the key values linking the detail table to the header record. |
| In the case of a file with fixed length, it is necessary to indicate the number of characters for each record. |
Close
Presentation
The different fields to be imported are defined in this grid, organised in groups identified by the Code column, in which is found one of the codes defined in the indicators grid from the first tab (the field can remain empty if no table has been defined).
This tab contains the grid defining the detailed structure of the groups existing in the first tab. It should be noted :
Close
Fields
The following fields are present on this tab :
Table Fields
|   | |
| This field is only entered if the group indicator grid in the previous tab is not empty. It is used to attach the information to be exported or imported to a group of data. | |
| Defined here is the database table where the data to be imported or exported is defined. It should be noted that:
| |
| It is used to indicate the name of the field of the table to be imported or exported. Different syntaxes are possible here in order to define the information to be extracted or integrated :
| |
| Add a comment to make it easier to understand parameterization. | |
| Three choices are possible in this field :
| |
| This column is only useful in the case of a fixed length format ; in this case, the position gives the gap with respect to the start of the block or the record (positions given in number of bytes, 1 signifying that it is the start of the section or record). The positions must be compatible with the size of the record. | |
| This field determines the length of the field for a sequential file. | |
| This column is only entered if the format is fixed length. For numeric amounts, the format entered is defined in the form of nnn or nnn.mmm, remembering that these numbers can be prefixed by < or > (left or right framing being completed with zeros, the right alignment must be used by default), prefixed or suffixed by the character + (mandatory sign before/after the number), and prefixed by the character * (the decimal separator must not appear). The grid below displays examples of the formatting for a given amount (the spaces are replaced here by #).
For an alphanumeric format, the only formatting directives that are possible are < or > (left or right alignment, remembering that the character strings are completed with spaces). | |
| ||
| ||
| ||
| This number, if it exists, refers to a transcoding table used to transcode the field that is read and make it comply with the expected format. |
File generation
|   |
| It is used to define the path of a default data file that will be proposed during the launch of the import or export (and used in automatic fashion when launching an import or export chain). This file path can be relative, in this case, the database directory is supposed to be the database directory for the installation of the software). The path can include the character #. If this is the case, there will be a sequential number management :
For instance, if the export sequence number is equal to 156, /u/tmp/fil# makes it possible to generate the /u/tmp/fil156 file. |
| It is used to force a final directory to which the file will be transferred after having been imported. Should there be no value, the directory mentioned in the import/export general parameters is used. |
Close
Functions accessed by right click on the grid
Fields
The following fields are present in this window :
Block number 1
| It defines the table for which the fields to be inserted must be selected. |
|   |
| In this column the field name for the table is defined as it will be expressed in the software (a field with the name NOMCHAMP defined in an ABV abbreviation table can be accessed using the syntax [F:ABV]NOMCHAMP ). For custom/specific fields, the field name must start with X_, Y_ or Z_. In the database, each zone corresponds to one or more fields (according to whether or not the zone is sized : the corresponding fields are called NOMCHAMP_0, NOMCHAMP_1, NOMCHAMP_2…) To enter and display the corresponding field on a screen, it is given the same name in the screen dictionary and the screen and the table will be used simultaneously in object management. |
| Title associated to the previous code. |
| If the field is equal to Yes, it is inserted into the main table. By default, the fields that are not in the main table are proposed to be set to Yes, and those that are in the main table are proposed to be set to No. |
Close
This is used to globally insert from the current line in the grid, a group of fields coming from a table in a template.
This function is only present for templates with a fixed field length types. It is used to re-calculate the position of each of the fields in the current data group (having the same line indicator). The re-calculation is carried out from position 1 in the first field of the group and by adding the length of each field, the position of the next field is obtained.
Fermer
By default, the following reports are associated to the function :
PRTSCR : Screen print
This can be changed by a different setup.
The following fields are present on the window opened through this button : Block number 1
Block number 2
Close This button is used to copy the record definition from or to another folder. |
The following fields are present on the window opened through this button : Table Range
Table Criteria
Close This button gives access to a screen in which it is possible to define the default values for the criteria to filter the exported data. When the export is launched, the criteria are displayed and can be modified ; when a chain of exports is launched, the criteria are automatically applied without entry, for each of the templates in which they have been defined. |
This function is used to access the documentation management on the first paragraph of the documentation (if there is one) associated to the current record.
This function is used to access the links management. It is used to define the links between the current and other records (for example the links between functions and setups). These links are specific to the documentation and are used to load the generation of documentation structures.
This menu is used to launch a documentation generation. The generation can also be launched from the [Generation] button at the bottom of the window.
Three types of generation can be launched one by one or simultaneously:
The range suggested by default takes into account the current record but it can be modified upon launch.
In addition to the generic error messages, the following messages can appear during the entry :
The object has not been defined as importable (tick box Import not ticked in the tab Miscellaneous).
The same code associated with different codes has already been entered.
This message is displayed when a link has been expressed in the groups grid using a field ZZZ that is not referenced in any of the tables (XXXXX, YYYYY, ...) defined in the previous lines.
In the fields grid, for the G group, there is no line indicating the place where the group identifier is found (syntax /).
An attempt has been made in the lines describing the fields, to insert a field coming from a table that has not been linked to the main table in the group.
The length defined by the numeric format (mmm) is different from the length of the field defined in the previous column (nnn).
No directory existence test is made on the file path defined by default in the template (the directory may not yet exist: this test is only made on launching an import or export).
When an import template is parameterised, it is necessary to consider the following principles :
Any number of data exports is always possible irrespective of the object, but this is not always the case for the import. The automatic mechanisms for decoding the data flow and the call to the conditions linked to the object greatly automate the import, but this is not sufficient for an automatic import of complex objects. Thus, not all objects can be imported.
In the reference folder, an import template (modifiable) is supplied for each object where the import is possible. There can nevertheless be peculiarities linked to this import : this is defined with the help of the on-line help associated with the import templates for which the specific cases exist (this aid is accessible by Alt + F1 when the template is loaded).
The list of corresponding helps (sorted by module) can be found from the next link.
The choice of the structure of the files to be imported or exported depends on the extraction or integration possibilities that are found in the external software.
In all cases, the data must be organized in logical groups of lines, which can be of different types (e.g. header, detail, sub-detail) or a single type. The organization of these groups is defined in the identifiers grid located in the first tab of the template.
Each group is associated with one of the tables in the database (the first being the main table of the object, the others are defined by the links from the previous tables). When using the template to carry out an object export, it is possible to define the links with any table in the database in which a theoretic link exists, in order to extract the linked data. On the other hand for an import template, only the tables updated by the object are actually usable : it is for instance not possible to simultaneously import the order and the customer, the order object was not designed for this.
It is important to note that this grid can be empty if a data structure to be imported or exported is based on the use of only the main table (in this case, the Code column for the next page will remain empty). it is also not necessary to create several data groups if several linked tables must be exported simultaneously In fact, if fields extracted from different tables are displayed in a single data group, the export process will attempt to resolve the links between tables by using the link structure described in the dictionary. This supposes that there is only one link possible from the main table in the group to the described table (if not, the first link encountered will be used and even if it is not the correct one).
There is specific case where it is necessary to create at least a group : if the template is defined with a fixed length (in this case, it is in fact necessary to define the record length somewhere and this is done in the group of tables). If the group indicator is not required to be present in the list of fields, it is sufficient to define this group with an empty code : only one group can then be defined and the Code column will no longer be entered in the next tab.
The identifier grid is only accessible if the object is of the single type. If group indicators are defined, each is associated with a level, a table and the link conditons that make it possible to create the link between them.
The main table is set to level 1 for import or export (this table is not entered in the grid, but is deduced from the object associated with the template).
For any table linked to a previous table, the level is equal to the level of the previous table if a one-to-one link exists between the two tables, and to this level plus one if several records are linked to a record in the previous table. The link is characterized by the key for the destination table to be read and by the key segment expression whose value defines the linked lines.
Imagine for instance that groups are defined according to the following example :
Level | Group |
1 | A |
2 | B |
2 | C |
3 | D |
Overlapping will then be obtained according to the information :
Group A record 1 |
|
|
| Group B record 1.1 |
|
| Group B record 1.2 |
|
| ... |
|
| Group B record 1.N |
|
| Group C record 1.1 |
|
|
| Group D record 1.1.1 |
|
| Group D record 1.1.2 |
|
| ... |
|
| Group D record 1.1.M |
| Group C record 1.2 |
|
|
| Group D record 1.2.1 |
|
| ... |
| Group C record 1.Q |
|
|
| Group D record 1.Q.1 |
|
| ... |
|
| Group D records 1.Q.R |
Group A record 2 |
|
|
| Group B record 2.1 |
|
| ... |
|
To illustrate this parameterization the following example takes a template (export only) bringing into play the companies and sites :
The grid below summarizes the Identifiers grid as they would be entered :
Level | Code | Table | Key | Link | |
1 | CPY | COMPANY | CPY0 |
| main group record |
1 | CUR | TABCUR | TCU0 | [CPY]RGCCUR | 1 linked record |
2 | FCY | FACILITY | FCY1 | [CPY]CPY | N linked records |
2 | ADP | ADOVAL | ADW0 | [CPY]CPY | M linked records |
The file formats are determined by the type, which can take one of the values below :
This is a field with variable length, where all the fields are separated by a separator (the separator field being SC).
Field 1 record 1 | SC | Field 2 record 1 | SC | ... | Field N record 1 | SC |
Field 1 record 2 | SC | Field 2 record 2 | SC | ... | Field N record 2 | SC |
This is a file with variable length, where all the fields are separated by a separator (the field separator). When the record is complete, another separator (the line separator SL) replaces the field separator.
Field 1 record 1 | SC | Field 2 record 1 | SC | ... | Field N record 1 | SL |
Field 1 record 2 | SC | Field 2 record 2 | SC | ... | Field N record 2 | SL |
This is a file with variable length of the same type as the ASCII2 file (two distinct separators). But in addition, the fields of character string type are contained by a field delimiter (called DC, in the example below, the second field is of alphanumeric type ).
Field 1 record 1 | SC | DC | Field 2 record 1 | DC | SC | ... | Field N record 1 | SL |
Field 1 record 2 | SC | DC | Field 2 record 2 | DC | SC | ... | Field N record 2 | SL |
This is a file where the fields are defined with a fixed length, without a field separator. The total length of the record must therefore be given in a parameter. There may be a line separator. In this case, its length must not be counted in the record length.
In the same way, the length of each group is defined when blocks of data are defined in the indicators grid.
Fld 1 rec 1 | < ---------Field 2 record 1------------ > | ... | < --Field N record 1-- > | SL |
Fld 1 rec 2 | < ---------Field 2 record 2------------ > | ... | < --Field N record 2-- > | SL |
It is a format where data are defined in XML tags.
Upon export, the file contains a large number of information related both to the model and the extraction. Upon import, the useful data are less important, it is thus possible to limit them in the file to be imported.
After the xml header, an initial tag is used to determine the export conditions :
<EXP MOD="model" OBJ="object" FOL="folder" DAT="date" TIM="time" USR="user" CHR="sequence number"> |
model, object being respectively the model code and the relative object, folder the file code, date, time, and user being specific to the extraction conditions.
Upon import, the initial tag can simply be <EXP>.
Then, for each group of data, there is a header which is as follows :
<GRP LEV="level" TAB="table" KEY="key" LNK="link"> |
GRPbeing the group code, level the level of this group, table, key, and linkbeing the other elements entered in the links grid.
Each field is defined by a line of the type :
<FLD NAM="name_field" TYP="type_data" LEN="length" VAL="value" </FLD>
name_fieldbeing the name of the field which is exported, type_dataand length its characteristics, value which defines its value.
Obviously each group ends with the tag </GRP>, and a tag </EXP> must end the file.