Generating 997 Acknowledgements


    Generating 997 Acknowledgements

    A 997 Acknowledgement file can be generated after calling the Validate() method on the EDIValidator component. Ack997Generator uses the Errors property as well as the loaded EDI document from the EDIValidator component to create acknowledgements.


    // Create an instance of EDIValidator
    EDIValidator validator = new EDIValidator();

    // Set the EDI rules file
    validator.EDIRulesFile = “C:\\EDIFile.Rules“;

    // Set the EDI file to validate
    validator.EDIFile = “C:\\EDIFile.txt“;
    // Set any other necessary properties on the validator

    // Validate
    // Create the 997 generator
    Ack997Generator ack = new Ack997Generator();
    // This char will be used to pad data to meet minimum length.  For example group control numbers
    ack.PaddingChar = ‘0’;
    // Generate the 997 document
    EDIDocument doc997 = ack.Generate(validator);
    // Get the text
    string edi997Data =  doc997.GenerateEDIData();


    in ACK 997 Generator
    Did this article answer your question?