# Import-/Export-Facility

## Default Entries

The following settings can be entered into the defaults:

EDB-IEF-UPD-IMD
0 | Entering or changing the data records in the database after the whole file has been processed. The items are then selected in a widget. This can cause problems as in the read-in file the same items might appear several times for deleting or entering as the delete operation is only carried out after all entries have been made.
1 | Entering or changing the data records immediately after the line in the file is processed. Possible database errors occurring are recorded for every data record.

EDB-IEF-DEL-IMD
0 | Deleting the data after 19 data records.
1 | Deleting every data record individually. Possible database errors occurring are recorded individually.

EDB-IEF-LOGGING
0 | A record file is not generated.
1 | A record file is created.
2 | A record file is generated but only incorrect data records are recorded.
3 | Like 1, additional error messages are written to the record file.
4 | Only error messages and incorrect data records are recorded.

EDB-IEF-LOG-OPT
0 | The record file is closed each time it has been filled in so that the data is recorded in case of a system crash.
1 | The record file is only closed at the end of the program so it can therefor happen that in case of a system crash not all data records are recorded.
2 | The record file is kept open but the operating system puffer is written to the disk after every write access.

EDB-IEF-LOG_2_SCRN
0 | Logging takes only place to a file.
1 | Logging takes also place on the screen.

EDB-IEF-MAX-LIST-LEN
100 | Number of data records selected during read-in before saving them in the database. If EDB_IEF_UPD_IMD =1 this value has no significance.

EDB-IEF-TRA-INSERT
1 | Transaction code for recreation when reading in data. The transaction code can have a maximum of two digits and must be an integer. If the data record does already exist it is changed when the setting EDB-IEF-TRA-STRICT is "0". In all other cases an error message is issued and the data record is not modified.

EDB-IEF-TRA-MODIFY
2 | Transaction code for modifications when reading in data (minor changes that means change does not result in an higher version). The transaction code can have a maximum of two digits and must be an integer. If the data record does not yet exist it is created when the setting is "0". In all other cases an error message is issued and the data record is not created.

EDB-IEF-TRA-DELETE
3 | Transaction code for deleting when reading in data. This transaction code also deletes all structures and relationships when the setting EDB-IEF-ENT-DEL-REF is set to "1". The transaction code can have a maximum of two digits and must be an integer. If deleting is prohibited this value must be set to a value not existing ( e.g. to "-1"). When deleting a data record in Agile e6 a data record is automatically created which contains this code as transaction code. The read-in program on the MRP side can then determine what is to happen with the data record. (Deletions do normally not occur in Agile e6.) The userexit must exist.

EDB-IEF-TRA-RELEASE
- | Transaction code for releasing a data record. This code is used for reading in. A data record is in this case transferred to the state RELEASE provided that it is in a state which allows this.

EDB-IEF-TRA-NO-OP
0 | Transaction code for "no operation" that means the data record is ignored when importing and not recorded.

EDB-IEF-TRA-STRICT
0 | Transaction codes are interpreted less important that means if a data record does already exist it is nevertheless modified and vice versa.
1 | If it is tried to create a data record already existing or to modify a data record not existing this will lead to an error and the data record is created or modified.

EDB-IEF-TRA-FK
999 | This is a special case for the transaction code and should NOT be used. The value specifies the upper limit for a transaction code. When importing larger values are analyzed as progress indicators and not as transaction codes. The progress indicator indicates to which status/ maturity degree the data record is to be transferred..

EDB-IEF-ART-UNQ
0 | If several versions exist for a data record the data record found last is modified when reading in.
1 | If several version of a data record exist this will lead to an error and the data record is not modified.

EDB-IEF-MSG-W-FNC
0 | For the message function the C function is not specified.
1 | For the message output in Agile e6 the C function is specified.

EDB-IEF-POS-COL-NAME
ZERO | Name of Agile e6 column which is called on for reference widgets in order to review its uniqueness (@INDEX). If this position is found, it is modified otherwise a new position is inserted.

EDB-IEF-REF-INT-IDX
0 | Index (@INDEX) is of the type character.
1 | Index is of the type integer (Index increase is carried out automatically for positions inserted newly.)

EDB-IEF-REF-IDX-INC
1 | Increment for increasing the position number in a relationship.

EDB-IEF-REF-DEL
0 | The reference tables is NOT delete before reading in this results in the positions being extended or changed. If positions exist in Agile e6 which are not in the transfer file these will not be changed.
1 | The reference list is deleted before reading in. Agile e6 contains those data records after reading in which exist in the read-in file. For e.g. history entries a protection against deletion exists for certain data. The referencing process is nevertheless continued.

EDB-IEF-DEL-TRA
0 | When deleting data records the trash is not emptied during the reading in process. This enables a manual RESETTING during the reading-in process. This can lead to problems as the positions must be unique for relationships. Here the position to be read would be contained in the trash due to the deletion. The size of the trash depends on the Data-View version. If the trash is overflowing this can also lead to problems.
1 | Deleting the trash after having deleted the data records.

EDB-IEF-ENT-DEL-REF
0 | When deleting, only the data record is deleted. If relationships exist for the data record, this leads to an error. Deletion writes the data record to the trash.
1 | When deleting, all relationships of the data record are also deleted. The deletion takes place DIRECTLY that means not via the trash.

EDB-IEF-MAX_BUF_LEN
2047 | Max. record length for the output and reading in to/ from a file.

EDB-IEF-ON-IMP-ERROR
B | If an error occurs during the import the program is aborted (break).
C | If an error occurs during the import the program is not aborted (Continue).

EDB-IEF-ON-EXP-ERROR
B | If an error occurs during the export the program is aborted (Break).
C | If an error occurs during the export the program is not aborted (Continue).

EDB-IEF-ISTART-USX
- | Name and parameter of the userexit when importing which is called up before opening the read-in file. ( see also format description).

EDB-IEF-IPRE-ACT-USX
- | Name and parameter of the userexit when importing data. This userexit is called up before the file is saved or called up in EDB (see also format description).

EDB-IEF-IPST-ACT-USX
- | Name and parameter of the userexit when importing data which is called up after saving in the file or calling up in EDB (see also format description).

EDB-IEF-IEND-USX
- | Name and parameter of the userexit when importing data which is called up after having closed the file (see also format description).

EDB-IEF-ESTART-USX
- | Name and parameter of the userexit when exporting data. This userexit is called up before the file is opened ( see also format description).

EDB-IEF-ETST-TOP-USX
- | Name and parameter of the userexit when exporting data before the fields of the father of a relationship are issued. Here it is possible to test if the export of a structure (bill of materials) has already been carried out or not ( pre-action userexit of the father format).

EDB-IEF-ETST-REF-USX
- | Name and parameter of the userexit which is called up when exporting data before the data of the relationship (positions) is issued. Here it is possible to test for every position if the component related has already been transferred and if these are still transferred individually or if the transfer of the faulty structure has been aborted (pre-action userexit of the relationship format).

EDB-IEF-ETST-BOT-USX
- | Name and parameter of the userexit which is called up when exporting data before the data of the component is written to the file (pre-action userexit of the component).

EDB-IEF-EPST-ACT-USX
- | Name and parameter of the userexit which is called up when exporting data after writing a line into the file.

EDB-IEF-EEND-USX
- | Name and parameter of the userexit which is called up when exporting after the file has been closed ( see also format description).

EDB-IEF-TST-IDX
0 | This value specifies that no position number check is carried out. All data records read in are inserted.
1 | This value specifies that the position number is to be checked when reading in. If the position does already exist it is then changed if it does not exist a new position is inserted. An entry with @INDEX must exist in the EDB filed column.

EDB-IEF-MEM-FRE
0 | This value should only be set for small import files (up to approx. 1000 data records).
1 | This value specifies that a storage release according to <MAX-LIST-LEN> has taken place.

EDB-IEF-GET-DB-IDX
0 | This value specifies that the largest number is always only read from the mask.
1 | This value specifies that the largest number is read from the data base when counting the position number up automatically.

EDB-IEF-ZAG-MAS-WRI
0 | This value specifies that no field userexit is executed when importing data.
1 | This value specifies that the field userexits are executed in the mask fields when importing data to the mask.

EDB-IEF-GET-DB-FLD
0 | This value specifies that only fields ca n be exported that are contained in the mask.
1 | This value specifies character fields which do not exist in the mask are read from the database when exporting data. With this it is possible to export multilingual fields with all languages.

EDB-IEF-PUT-DB-FLD
0 | This value specifies that only those fields can be imported which are contained in the mask.
1 | This value specifies that character fields not existing in the mask are directly written to the database when importing data. With this it is possible to import multi-lingual fields with all languages. As the data is saved temporary, not too much fields should appear in the mask.

EDB-IEF-CLR-LGV-VAR
0 | The LogiView system variable remain existing
1 | (Default) Deleting the LogiView-system variable after invoking a LogiView function from IEF.

EDB-IEF-CMP-OLD-NEW
0 | (Default) No comparison. The value modified by IEF is written to the database in any case also if the values are identical.
1 | Compares the values of a field before and after the modification by the IEF import. If the values are identical the database is not modified.

EDB-IEF-CNF-WRN
0 | No message and continuation of the function. This value allows the definition of a general format definition whereas only the currently existing fields of the mask are edited. If the value is "0", no messages is issued which fields are not filled in when importing and exporting.
1 | (Default) Error message and abortion of the function if no EDB field is contained in the mask (or in the database in EDB-IEF-GET-DB-FLD==1 or EDB-IEF-PUT-DB-FLD==1).

EDB-IEF-GET-TOP-ACC
0 | (Default) Access rights must be set with @RIGHTS, @OWNER and @GROUP.
1 | When exporting structures all access data (rights, owner and group) of the farther element is copied (when invoking the function edb_ief_set_usr_acc).

EDB-IEF-GET-USR-ACC
0 | Access rights are not read. This value MUST be set if the database table is an external table and if it has no fields for access rights.
1 | (Default) Reading the access data of a data record when exporting so that the key words @RIGHTS, @OWNER and @GROUP can be used.

EDB-IEF-GTM-INS-DUP
0 | (Default) Before inserting a data record in the classification IEF checks if the data record does already exist. If this is a case it is rejected or modified.
1 | Allows to insert data record in a classification also if this does already exist. (Must also be allowed by EDB) The data record will then always be inserted.

EDB-IEF-HEAD
n | (Default) Number of rows which are to be ignored at the beginning of an import file.

EDB-IEF-LOG-DTV-MES
0 | (Default) Possible message to be depicted on the screen which do not result from IEF (e.g. right problems, value too large for the EDB field etc.) are not recorded in the IEF protocol file.
1 | Additional recording, all messages occurring on the screen in the IEF protocol file. This is e.g. important when a data import or export shall be carried out automatically and the error protocol shall be checked afterwards.

EDB-IEF-USX-SYN-HLP
0 | Only the name of the IEF userexit is depicted.
1 | (Default) The selection menu for the IEF userexit also depicts the call syntax.

EDB-IEF-ZAG-MAS-RETF
0 | The EDB field name is exactly used as specified in the EDB field definition.
1 | For determining the EDB field the EDB function zag_mas_ret_fld is used. This has the advantage of specifying the field name in the IEF field definition without a table name and/or language suffix. An IEF format is therefor always valid for the currently selected language. If the language suffix is nevertheless set the field with the specified language is reserved with the value The value can e.g. be set to 1 in order to gain a uniform format for exporting classifications (table name "SMLnnn" can be dropped). For the import it is still necessary to specify the mask name of the import in the format definition.