Setting The Output File


    Setting The Output File

    Creating an EDI document is easy with the EDIDocument component. The EDIDocument component contains a constructor that accepts a path to a file to create. EDIDocument will create the file when generating EDI content.


    // Instantiate an instance of EDIDocument and set the filestream parameter
    EDIDocument sampleEDIFile = new EDIDocument(“C:\\edi.txt”);

    // Create an interchange loop. This loop will contain all other loops in the EDI structure
    Loop interchangeHeaderLoop = new Loop(Interchange Header”);

    // Add the interchange loop to the EDI document

    // Generate the EDI file
    You can also set the EDIFilePath property of EDIDocument before calling the GenerateEDIFile() method.
    in EDI Document
    Did this article answer your question?