Click here to Skip to main content
15,896,453 members

We found following error when we load a Edi file ?

Atul Kumar Singh From Pune asked:

Open original thread
Error :-
[DESCRIPTION:Implementation guideline for version '005 01 ' not supported.][CODE:13228]

Please Help...
code is below and Error line is last line:-

C#
ediDocument oEdiDoc = null;
        ediDataSegment oSegment = null;
        ediAcknowledgment oAck = null;
        ediSchemas oSchemas = null;

        string sSegmentID;
        string sLoopSection;
        int nArea;

        string sPath = AppDomain.CurrentDomain.BaseDirectory;

        //edi file to be acknowledged
        string sEdiFile = "837_5010X222A1.X12";

       // Cursor = Cursors.WaitCursor;

        //instantiat edi document object
        ediDocument.Set(ref oEdiDoc, new ediDocument());    // oEdiDoc = new ediDocument();

        //By default, FREDI uses the  universal coordinated time (UTC), however you can change it to local time
        oEdiDoc.set_Option(DocumentOptionIDConstants.OptDocument_UseLocalTime, 1);

        // Disabling the internal standard reference library to makes sure that 
        // FREDI uses only the SEF file provided
        ediSchemas.Set(ref oSchemas, (ediSchemas)oEdiDoc.GetSchemas());    //oSchemas = (ediSchemas) oEdiDoc.GetSchemas();
        oSchemas.EnableStandardReference = false;

        // This makes certain that the EDI file must use the same version SEF file, otherwise
        // the process will stop.
        oSchemas.set_Option(SchemasOptionIDConstants.OptSchemas_VersionRestrict, 1);

        // By setting the cursor type to ForwardOnly, FREDI does not load the entire file into memory, which
        // improves performance when processing larger EDI files.
        oEdiDoc.CursorType = DocumentCursorTypeConstants.Cursor_ForwardOnly;

        // If an acknowledgment file has to be generated, an acknowledgment object must be created, and its 
        // property must be enabled before loading the EDI file.
        oAck = (ediAcknowledgment)oEdiDoc.GetAcknowledgment();

        /*.........commented by atul because this method not present in 5.3 version of Edi dll*/
      
       // oAck.EnableImplementationAcknowledgment = true;



        // Set the starting point of the control numbers in the acknowledgment
        oAck.set_Property(AcknowledgmentPropertyIDConstants.PropertyAck_StartInterchangeControlNum, 1001);
        oAck.set_Property(AcknowledgmentPropertyIDConstants.PropertyAck_StartGroupControlNum, 1);
        oAck.set_Property(AcknowledgmentPropertyIDConstants.PropertyAck_StartTransactionSetControlNum, 1);

        // Error codes that are not automatically mapped to an acknowlegment error number by FREDI can be set by
        // using the MapDataElementLevelError method.
        oAck.MapDataElementLevelError(13209, 5, "", "", "", "");

        // All SEF files required for processing the EDI files must be provided by calling the LoadSchema.  
        // The "LoadSchema" method does not actually load the SEF files at this time, but are actually 
        // loaded during the LoadEdi method.
        oEdiDoc.LoadSchema(sPath + "999_005010X231A1.EVAL0.SEF", 0);    // evaluation SEF file for Ack (999) file
        oEdiDoc.LoadSchema(sPath + "837_005010X222A1.SemRef.EVAL0.SEF", 0);    // evaluation SEF file for EDI (837) file

        // Loads EDI file and the corresponding SEF file
        oEdiDoc.LoadEdi(sPath + sEdiFile);
Tags: C# (C# 4.0)

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900