Article: Combining Transactions – JS

Index

Combining Transactions

EDIFileLoader allows developers to combine different ISA messages into difference loops. By default the structure is flat. However by setting the FlatStructure property to false ISA segments will be converted to top level loops.

Example

const edi = require(‘rdpcrystal-edi-library’);
 
let dataToLoad = “ISA*00*          *00* ….ISA*00*…”;
 
//Create a new EDIFileLoader
let fileLoader = new edi.EDIFileLoader();
 
fileLoader.EDIDataString = dataToLoad;
 
fileLoader.FlatStructure = false;
 
//Load a flat version of the data
let flatDoc = fileLoader.load();

The load() methods returns a EDILightWeightDocument. Notice that there are two message loops created, one for each interchange:

Related Articles

Main Categories