You can set up a Text document to export and import data using the Freeway Integration Format (FIF) OpenText format. Using this format, the Text document uses the first three characters of a record to identify the record purpose. The first record (**!) and the last record (**@) are defined as fixed text. All other records are handled as standard text with the defined field separator.
Document setup
On the document, make sure this setup is applied:
- Header, Custom section:
- Handler: BisDocumentTextFreeWayIntegration or BisDocumentTextFreeWayIntegrationV3 (Use the V3 handler class in combination with a connector of type Web service, Blob storage, or Upload and download.)
- Header, Record layout section:
- Use header: No
- Record identification: Yes
- Field wrapper: "
- Field separator: Enter the desired value.
- Lines
- First record: **!
- Last record **@
- Fields of first and last record: Set the fields as prescribed for FIF. Make sure, to set each field Length as prescribed as well.
Example of the fields setup for the first record:

Example of the fields setup for the last record:

- Other records: Set up the other records and related fields in line with the setup as prescribed by OpenText for FIF. OpenText provides code lists and structures for several data sets, for example, Order, Invoice, and ASN.
Initialize records and fields
You can initialize the record of a FIF Text document. If the document is:
- Used in a message, initialization only adds new records with related fields. Existing records are not changed.
- Not used in a message, on initialization you can choose to:
- Delete all existing records and add new records with related fields.
- Only add new records with related fields. Existing records are not changed.
If the initialization is finished, check:
- The parent. Unlike for XML or JSON, no structure information is available.
- The Length of the record fields. By default the length is set to 60. For FIF, fields have a maximum length and several fields have a fixed length. Make sure the field length is set accordingly.
Note: For the first (**!) record and the last (**@) record, the field values are set automatically in line with FIF.
To get nice field names on initialization, create a text file with the field names. Example of the content of a text file with field names:
**!1.01.23GORD 36020200214040344C
**D, Company Code,Account (Partner) Code,Supplier ID (Partner calls Company),Document Type,Document Sub Type,Document Function,Document Reference,Document Date,Document Version,Document Release Number,Document Release Date,Currency Code,Reference Currency,Routing Address,Exchange Rate,Business Channel,Packing Classification
**A,Line Sequence Number,Schedule Sequence Number,Address Type,Global Location Number (GLN),Dun & Bradstreet D-U-N-S,Standard Address Number,Industry Assigned Code,Code Assigned by Buyer,Code Assigned by Seller,Name,Address Line 1,Address Line 2,Address Line 3 TownCity,Address Line 4 (Province/State),Post Code,Country,Tax Registration
**@ 3601 1
As a result, for example, the second record fields look like this:

Import
Usually, in a FIF text file, the field separator is defined. The field separator is the last character of the first record.
On import in Connectivity Studio:
- The field separator, as defined in the text file, is used to read the file.
- The first record and last record are handled as fixed text.
- A field value that is enclosed in double quotes is read as a string value. Note: If the field value has a double quote itself, in the text file, the field value (including the double quote!), is enclosed in double quotes.
Export
In Connectivity Studio, when you export data to a FIF text file:
- The field separator as defined on the document header is used.
- The field separator is added as last character to the first record in the text file.
- If a field value has a double quote, the field value (including the double quote!), is enclosed in double quotes in the text file.
See also