Usage > Imports / exports > Import/export temporary storage space 

When a data import process is launched, the data to be integrated are read by logical line groups of different types (for instance, a header, the associated detail lines, a sub-detail of the detail lines etc.). Each logical group of lines forms a record.

The structure of the record is defined in the import-export template (via the flag grid). If no line is defined in this grid, each line composes a record.

Upon import, each record is tested from a data format point of view, but also by using more general consistency rules (business rules). If errors are detected at this stage, the record is not integrated (but the next records may be integrated).

The import-export temporary storage space is used to store the detail of the rejected data for a given imported file: in a batch, each rejected record is observed under the form of 1 to N lines, and in each line, there is the description of the line structure, along with the field values read in the file. When errors have been detected in a given field, they are highlighted with a preset style.

Then, the user can:

  • modify the wrong values
  • add lines, if need be
  • reextract the data of a set of batches into a file, so as to reimport it again after correction.
  • add records in a given batch.

It is also possible to directly import a file into the import/export temporary storage space without attempting to import it for real. In that case, only the consistency controls of the data format will be performed, and all the groups will be put in the temporary storage space.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

The storage space is managed in an object subdivided into two tabs, the left lists provide, in addition to the traditional divisions (left list presenting a line by batch, and last read) the possibility to display:

  • the numbers with the detail of the lines, in a hierarchical manner (Import/export temporary storage space by Batch)
  • a hierarchy by batch number / line number / field for the lines for which an error has been detected (Import/export temporary storage space by error).

Header

Presentation

The header identifies the batch and the current line in the batch.

Close

 

Fields

The following fields are present on this tab :

Block number 1

  • Lot no. (field NUMLOT)

The batch number, that is assigned from a sequence number counter, identifies a consistent group of data imported into the storage space.

It defines the import/export template that has been used when feeding the storage space.

This template code can be used in the batch numbering, if the sequence number counter incorporates a segment of a Complement type.

  • No. of lines (field NBRLIG)

It is used to display the number of lines of the current batch.

  • File (field FILEXT)

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 :

  • In import mode, this means that all the files where the template corresponds to the path will be searched, with # representing 5 numbers (the files are integrated in increasing order of the numbers)
  • In export mode, this means that a file is created integrating the formatted value of the sequence number counter [C]EXPORT on 5 numbers. This normally goes with checking the Sequence Number Management box during the launch of the export function.

For instance, if the export sequence number is equal to 156, /u/tmp/fil# makes it possible to generate the /u/tmp/fil156 file.

Block number 2

  • field LIGFIR

These radio buttons make it possible to navigate in the lines of the current batch, by respectively returning to the first line, the previous line, then switching to the next line, to the last line.

  • field LIGPRE

 

  • field LIGNEX

 

  • field LIGLST

 

  • Line no. (field NUMLIG)

 

  • Indicator (field LEVCOD)

It defines the code of the user corresponding to the processed line. For instance, if an import template manages header lines identifies with a H, detail lines identified with an L and sub-detail lines identified with an S, one of these 3 characters will be used.

  • Recording (field ENR)

It specifies the current line number and the number of lines by batch.

Close

 

Tab Lines

Presentation

This tab is used to display the fields of the template as they must be integrated for the current line type (identified by the flag). At the same time, there are the values found in the import file (with a specific formatting if an error has been detected on the field).

Close

 

Fields

The following fields are present on this tab :

Grid

  • field NBLIG

 

Displayed field that identifies the table in which the information is supposed to be integrated during import (this table is also found for the import/export template).

  • Field (field FLDNAM)

Displayed field that identifies the field in which the information is supposed to be integrated during import (this field is also found for the import/export template).

  • Description (field FLDINTIT)

Title associated to the previous code.

Displayed field that defines the type of data linked with the field to be integrated. Based on this type, some consistency controls can be performed. If the field value is entered, a selection window that is exactly dependent on the type can be activated.

  • Value (field FLDVAL)

It defines the value of the field to be integrated.

By default, there is the value that has been found during the import, and it is highlighted using a particular style if it is considered to be wrong. It can also be modified using this function.

It should be noted that, during entry:

  • selection functions can be accessed (via right click) in linked tables or in a list of local menus (in that case, the choice number is sent back).
  • existence tables are not carried out in the linked table or in the local menu (it is considered that the table in question can be updated using a preliminary import): the control will be performed only when the update is actually performed).

A wrong field is displayed again in the default style whenever an entry complying with the field format constraints has been completed on the line. The concerned line also disappears from the error list (it is still included in the error table, but a flag indicates that it has been corrected).

Close

 

Tab Text file

Presentation

When a clob type field (lenghty character string) is defined in the template, this tab is used to display its value and to modify it, if necessary, by clicking on the corresponding button.

Close

 

Fields

The following fields are present on this tab :

Block number 1

  • Text file (clob) (field CLBINTIT)

It defines the clob code.

  • Modification (field CLBEXE)

This button is used to switch to the modification mode for the text (clob type) presented here below.

Block number 2

  • field WA

 

  • field FLDCLB

Clob type field as it has been integrated into the import/export storage space. It can be modified via the button located at the top of the tab.

Close

 

Reports

By default, the following reports are associated with this function :

 PRTSCR : Screen print

This can be changed using a different setup.

Specific Buttons

It is used to add a line to the group by shifting by 1 line all the next lines in the record. The added line is proposed by default with the values of the previous line, but it is possible to modify said values. In case of aborting, the added line is deleted, and the shifted lines are given new numbers to bring them back to their original position.

The following fields are included on the window opened through this button :

File

  • Destination type (field TYPEXP)

 

  • Data file (field NOMEXP)

It is used to define the path of a data file into which the export has been launched. In case of a relative file path, the basic directory is supposed to be the basic software installation software.

It is possible to place the # metacharacter in the name of a file to be exported. In that case, this character is replaced by the current export sequence number, over 5 figures (preceded by zero, if need be), provided that a chronological export has been launched.

Close

It is used to reexport the current batch to a file whose name has been entered.

The following fields are included on the window opened through this button :

Block number 1

Use this field to define which template is to be used to extract data from the structured file into a format which can be used by Sage X3. Each template is defined using the function Import/export templates (Setup > Usage > Imports / exports).

Imported data is converted into the right format to populate the details in the matching database table in Sage X3.

Location

  • Destination type (field TYPEXP)

 

  • Data file (field NOMIMP)

It is used to define the path of a data file from which the import has been launched. In case of a relative file path, the basic directory is supposed to be the basic software installation software.

It is possible to place the # metacharacter in the name of a file to be imported. In that case, the import of all the files corresponding to the file name with figures instead of the # 4 will be carried out sequentially, the import order being the increasing order of the figures. This makes it possible to automatically import files created by the chronological export function, by importing the data in the order of their extraction.

Close

It is used to import the content of a file into the storage space. Unlike the standard import, that only stores in the storage space those records for which errors have been located, this function imports into the storage space all the records in the file. It creates a new batch.

Menu Bar

Current batch

It is used to delete the wole current batch from the storage space. A confirmation is requested from the user.

Current record

It is used to delete the whole record corresponding to the current line of the storage space, by renumbering the later lines of the record so that these lines keep numbers without any gaps.

Current Line

It is used to delete the current line of the record in the storage space, by renumbering its lines. If the first line in the record is deleted, the whole record is deleted.

Instance of line handling

In order to fully understand how line insertions and additions operate, let us imagine a simple template, composed of a header (H) and several lines (L).

Let us consider a file composed as follows:

  • Record 1 = header followed by 2 lines
  • Record 2 = header followed by 3 lines
  • Record 3 = header followed by 3 lines

If everything is imported into the storage space, the situation is as follows (the first line in each record appears in bold):

Line no.

Line type /no.

1

H 1

2

L 11

3

L12

4

H 2

5

L 21

6

L 22

7

L 23

8

H 3

9

L 31

10

L 32

11

L 33

When positioned on line 5, if the current line is deleted, the situation will be as follows (-- indicates the non-existent lines):

Line no.

Line type /no.

1

H 1

2

L 11

3

L12

4

H 2

5

L 22

6

L 23

--

--

8

H 3

9

L 31

10

L 32

11

L 33

Lines 6 and 7 have been squeezed so as not to leave any gap in the record, and the next lines have not been renumbered.

When positioned on line 1, 2 or 3 (first record), and the current record is deleted, or, and the result is the same, when positioned on line 1 and the current line is deleted, the situation is then as follows:

Line no.

Line type /no.

 --

 --

 --

 --

 --

 --

4

H 2

5

L 22

6

L 23

 --

 

8

H 3

9

L 31

10

L 32

11

L 33

Eventually, when positioned on line 5, and a line named NN is added, the situation is as follows:

Line no.

Line type /no.

-- 

 --

-- 

 --

--

 --

4

H 2

5

L 22

6

L NN

7

L 23

8

H 3

9

L 31

10

L 32

11

L 33

If a second line MM had to be added after line NN, the line shifting would propagate to the next record, in the following way:

Line no.

Line type /no.

-- 

 --

--

 --

-- 

 --

4

H 2

5

L 22

6

L NN

7

L MM

8

L 23

9

H 3

10

L 31

11

L 32

12

L 33

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO Refer to documentation Implementation