none
Ommiting EDI lines in output when they don't exist in input RRS feed

  • Question

  • Hi!

     

    I'm a Biztalk newbie and I'm translating a EDIFACT EDI message to an X12 message.

    I'm having a problem which I cannot solve.

     

    One of the line segment (RFF) in input file is optional and is stated in XSD as minOccurs = 0.

    Some times it is used, some times it is not. It is contained in a loop.

     

    I'm mapping all line elements directy from source schema to destination schema.

     

    When I test the Map, I get the following error:

     

    Invoking component...

    Test Map used the following file: <file:///C:\Documents and Settings\mfigueiredo\Local Settings\Temp\2\inputfile.xml> as input to the map.

    C:\Documents and Settings\mfigueiredo\Local Settings\Temp\2\MSC_SPC_CODECO_output.xml: error btm1046: Output validation error: The 'N901' element is invalid - The value '' is invalid according to its datatype 'http://schemas.microsoft.com/BizTalk/EDI/X12/2006:X12_ID_128' - The Enumeration constraint failed.

    Test Map failure for map file <file:///C:\Documents and Settings\mfigueiredo\My Documents\Visual Studio 2005\Projects\MSC EDI\MSC EDI\MSC_SPC_CODECO.btm>. The output is stored in the following file: <file:///C:\Documents and Settings\mfigueiredo\My Documents\Visual Studio 2005\Projects\MSC EDI\Test Messages\SPC_CODECO_GateIn_OutputTest.txt>

    Component invocation succeeded.

     

    It seems that, even that RFF (EDIFACT) line doesn't exist in input file, it tries to generate N9 (X12) segment in output file with empty values.

     

    Is there a way of fixing this? I want that when there is no RFF segment, it also doesn't create a N9 segment in output file.

     

    Many thanks.

     

    Miguel Figueiredo

    Thursday, October 9, 2008 3:29 PM

Answers