none
error while testing edifact to xml map RRS feed

  • Question

  • Hi,

    Im testing a map with edifact d01b pricat on the input side. If i choose "generate instance" when i test it everything is fine, but when i try use my own EDI file as input, i get the following error:

    testedi.edi: error btm1041: Native Parsing Error: Non Segment level  : [12] EFACT_D01B_PRICAT\ The element 'EFACT_D01B_PRICAT' in namespace 'http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006' has invalid child element 'UnrecognizedSegment'. List of possible elements expected: 'http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006:BGM'.

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    B : Position - 2 : [15] Use of segment, data-type or segment not supported in this position

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    B : Position - 2 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    D : Position - 3 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    D : Position - 4 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    N : Position - 5 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    N : Position - 6 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    C : Position - 7 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    P : Position - 8 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    L : Position - 9 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    P : Position - 10 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    P : Position - 11 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    P : Position - 12 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    I : Position - 13 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    I : Position - 14 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    I : Position - 15 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    I : Position - 16 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    M : Position - 17 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    P : Position - 18 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    P : Position - 19 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    P : Position - 20 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -
    U : Position - 21 : [72] Unrecognized segment ID

    testedi.edi: error btm1041: Native Parsing Error: Segment level  : Segment ID -

     : Position - 22 : [72] Unrecognized segment ID

     

    my input looks like this:

    UNH+37400001+PRICAT:D:01B:UN'
    BGM+9+10121+9'
    DTM+137:20080306:102'
    DTM+157:20080307:102'
    NAD+BY+7310019900073::9'
    NAD+SU+5700820604444::9'
    CUX+2:SEK:8'
    PGI+9'
    LIN+1+1+5414522652572:SRV'
    PIA+1+L1113512:SA'
    PIA+1+SH:GU'
    PIA+1+6767532:HS'
    IMD+F++DSC+::9:test'
    IMD+F+BRN+::9:test'
    IMD+F+SEA+:::test'
    IMD+F+35+:::test:test’
    IMD+F+ART+:::test'
    MEA+PD+AJB+MLT:250'
    PRI+AAA:239::LIU'
    PRI+AAB:299::LIU'
    PRI+AAE:599::SRP'
    UNT+22+37400001'

    • Edited by karar Tuesday, August 31, 2010 4:29 PM
    Tuesday, August 31, 2010 3:30 PM

Answers

  • Hi,

    I actually solved it. The problem where due to line breaks in the edi file.. so if i put all lines in a row it works.... /=

     

    thanks for all replies

    • Marked as answer by karar Wednesday, September 1, 2010 9:33 AM
    Wednesday, September 1, 2010 9:32 AM
  • Hi karar,

    Generate an instance. (in native format)

    The format of the generated instance will tell what is allowed. (according to the schema)

    Does your generated instance contain a UNH and UNT segments?

    If it does then your input instance should contain a UNH and UNT segments otherwise remove the UNH and UNT segments from your input instance.

    The error message states that it expects the BGM segment, but received the UNH which it does not recognize.

    Thanks,

    William

    • Marked as answer by karar Wednesday, September 1, 2010 12:38 PM
    Tuesday, August 31, 2010 6:16 PM
  • Hello Karar,

    - Have you tried adding the UNB/UNZ segments to your input file?
    - Do you get a dialog box asking you for some EDI settings like character set (UNOA/UNOB/.../KECA) and delimiters? Make sure this is filled in correctly. Maybe you have the segment delimiter set wrongly (should be ' + CR + LF as I see it here).

    • Marked as answer by karar Wednesday, September 1, 2010 12:37 PM
    Wednesday, September 1, 2010 7:25 AM
  • THat seems like a work around. 


    You may need to dig into the party management when you are trying to pull in a real file when you actually try to parse in a real EDIFACT document.

    You can GO to Parties-> select your party ->Right Click ->Select [EDI Properties]

    Under Edifact Properties ->Party as interchange sender ->Validation and ACK Generation.

    There are DOCUMENT VALIDATION PROPERTIES. You will need to set these properly.  THe cheap way (open up any mistakes) would be:

    EDI type -Checked 

    Extended Validation - Unchecked

    Allow Leading and Trailing 0's and spaces - Checked

    Allow trailing seperators - Checked

    Create empty XML tags for trailing seperator - Unchecked.

    (Thank you for the marked)


    Mark Rowe MCTS:Biztalk http://everythingworkflow.spaces.live.com/

    • Marked as answer by karar Wednesday, September 1, 2010 12:37 PM
    Wednesday, September 1, 2010 11:52 AM

All replies

  • More than likely you need to setup the edifact party information through Biztalk administrator->Parties. I have limited experience with edifact, though in EDI there are ways in that configuration to set specfic rules for certain segments and parsing validations.

    Furthermore, this may be a segment that is needed for Party Context resolution.  Meaning it NEEDS specific data to know which part the edifact belongs to.

    More than likely it is the Header information that needs to be filled in properly.


    Mark Rowe MCTS:Biztalk http://everythingworkflow.spaces.live.com/
    Tuesday, August 31, 2010 4:26 PM
  • thank you for the answer,

    I changed the error message as you can se, but still... 

    Shouldn't i be able to test the edi file in visual studio with "test map"-function without the header info as it's not included in the schema?

     

    thanks in advance

    Tuesday, August 31, 2010 4:31 PM
  • There are two ways to do this, create that party and setup a temporary recieve location to pick up that as a file, with headers and all.

    Then reedit the header so that it matches for that specific party information and make sure that the message schema is deployed in some resource in your application and then attempt to pick up that file.

    If you are just checking the mapping then you are going to need to inspect each segment level for type and see if there are "specifics" needed for that specific segment.

    IE. In EDI some fields are dates and are very specific CCYYMMDD and if there are any other characters or it doesnt line up properly then the map will through those types of errors.  You can look at the EDIFACT Schema itself and look at each field that is throwing that error.  See what data it is expecting and double check the data type as well some are ENUMS meaning that like in EDI it expects on a T or P for certain segments.

     

    Sorry I  couldnt be more help.

     

      


    Mark Rowe MCTS:Biztalk http://everythingworkflow.spaces.live.com/
    Tuesday, August 31, 2010 5:05 PM
  • Hi karar,

    Generate an instance. (in native format)

    The format of the generated instance will tell what is allowed. (according to the schema)

    Does your generated instance contain a UNH and UNT segments?

    If it does then your input instance should contain a UNH and UNT segments otherwise remove the UNH and UNT segments from your input instance.

    The error message states that it expects the BGM segment, but received the UNH which it does not recognize.

    Thanks,

    William

    • Marked as answer by karar Wednesday, September 1, 2010 12:38 PM
    Tuesday, August 31, 2010 6:16 PM
  • Hello William,

    The instance i generate gets generated in XML and i don't see that visual studio can generate an instance that is in native format?

    Though, the generated xml instance contains UNH and UNT elements

    The UNH element of the generated instance looks like this (is the first node EFACT_DO1B_PRICAT needed in the edi test file as well? and what about the namespace?) :

    <gen0:EFACT_D01B_PRICAT xmlns:gen0="http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006">

    <UNH>

      <UNH1>UNH1</UNH1>
    - <UNH2>
      <UNH2.1>PRICAT</UNH2.1>
      <UNH2.2>D</UNH2.2>
      <UNH2.3>01B</UNH2.3>
      <UNH2.4>UN</UNH2.4>
      </UNH2>
    - <UNH4>
      <UNH4.1>13</UNH4.1>
      </UNH4>
    - <UNH5>
      <UNH5.1>UNH5.1</UNH5.1>
      </UNH5>
    - <UNH6>
      <UNH6.1>UNH6.1</UNH6.1>
      </UNH6>
    - <UNH7>
      <UNH7.1>UNH7.1</UNH7.1>
      </UNH7>
      </UNH>
    Wednesday, September 1, 2010 6:21 AM
  • Hello Karar,

    - Have you tried adding the UNB/UNZ segments to your input file?
    - Do you get a dialog box asking you for some EDI settings like character set (UNOA/UNOB/.../KECA) and delimiters? Make sure this is filled in correctly. Maybe you have the segment delimiter set wrongly (should be ' + CR + LF as I see it here).

    • Marked as answer by karar Wednesday, September 1, 2010 12:37 PM
    Wednesday, September 1, 2010 7:25 AM
  • Hi,

    I actually solved it. The problem where due to line breaks in the edi file.. so if i put all lines in a row it works.... /=

     

    thanks for all replies

    • Marked as answer by karar Wednesday, September 1, 2010 9:33 AM
    Wednesday, September 1, 2010 9:32 AM
  • THat seems like a work around. 


    You may need to dig into the party management when you are trying to pull in a real file when you actually try to parse in a real EDIFACT document.

    You can GO to Parties-> select your party ->Right Click ->Select [EDI Properties]

    Under Edifact Properties ->Party as interchange sender ->Validation and ACK Generation.

    There are DOCUMENT VALIDATION PROPERTIES. You will need to set these properly.  THe cheap way (open up any mistakes) would be:

    EDI type -Checked 

    Extended Validation - Unchecked

    Allow Leading and Trailing 0's and spaces - Checked

    Allow trailing seperators - Checked

    Create empty XML tags for trailing seperator - Unchecked.

    (Thank you for the marked)


    Mark Rowe MCTS:Biztalk http://everythingworkflow.spaces.live.com/

    • Marked as answer by karar Wednesday, September 1, 2010 12:37 PM
    Wednesday, September 1, 2010 11:52 AM
  • ok (=

    not sure how the credit makes a difference though..

    Wednesday, September 1, 2010 2:10 PM