none
A few Edifact questions RRS feed

  • Question

  • Hi everyone,
    receiving an edi-file, I'd like to convert it to xml, which complies with a certain schema.
    I have a few questions regarding the edifact solution.

    1.) Do I always need the UNA segment?
    I thought it was optional, but if I don't include it, I'll get error 33: Invalid occurence outside message, package or group.
    I'd like to get rid of the UNA segment.

    2.) Do I always need a party?

    3.) How to handle namespaces correctly?
    I have a problem with the UNH segment of my test file.
    If I include the following UNH segment into the test file, everything will work well:

    UNH+SENDER123+BAPLIE:D:95B:UN'

    But if I include

    UNH+SENDER123+BAPLIE:D:95B:UN:SMDG20'

    I'll get error 502: Document spec type http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_D95B_BAPLIE_SMDG20 not found.

    The second segment is correct and I'd prefer to use it. But only the first one works. What do I have to do to get the solution running with the second UNH segement?

    Thanks in advance,
    Furtok

    Monday, March 9, 2009 1:30 PM

Answers

  • Hi,
        I used this sample file But may be you have created some custom schema also.

    I modified some fields of your instance for making compatible with schema EFACT_D95B_BAPLIE.xsd . And then I modified receive pipeline's EFACT delimeters to 0x3A, 0x2B, 0x2C, 0x3F, 0x2A, 0x27, 0x0D, 0x0A .

    It worked fine.

    following is the modified instance:

    UNB+UNOA:2+SENDER+RECIPIENT+090304:1230+UNIQUEID1234+++++SHIPPINGLINE'
    UNH+SENDER123+BAPLIE:D:95B:UN:SMDG20'
    BGM++M1+9'
    DTM+137:0903031447:201'
    TDT+20+VOYAGENO123+++CARRIERID:172:20+++DLHV:103:ZZZ'
    LOC+5+EGPSD:139:6'
    LOC+61+GRPIR:139:6'
    DTM+132'
    DTM+133'
    LOC+147+0030586::5'
    MEA+WT++KGM:10000'
    LOC+9+EGPSD:139:6'
    LOC+11+ITSPE:139:6'
    LOC+83+AFQLT:139:6'
    RFF+BM:1'
    EQD+CN+TOLU 2566410++1++5'
    DGS+IMD+2.3+2198+045:CEL+1+F-CS-U+16++8'
    FTX+AAD+++PHOSPHORUS PENTAFLUORIDE:109.0'
    UNT+18+SENDER123'
    UNZ+1+UNIQUEID1234'




    Thanks
    Gyan
    • Marked as answer by Furtok Wednesday, March 11, 2009 6:08 AM
    Tuesday, March 10, 2009 5:23 PM

All replies

  • Hi,
       
    1- UNA segment is not necessary. But if you do not include UNA segment then it will use default Delimeters that is defined in the property of the receive pipeline. You can change these default Delimeters.

    2- You don't need a party always. If you do not create any party it will resolve through global party.

    3- For this problem There may be following issues.

        (i)  You are not giving the namespace correctly in the party settings. For this go to the page part as interchange receiver EDIFACT interchange processing. And check the default target namespace is correct or not.
        (ii)  You did not deployed schema EFACT_D95B_BAPLIE_SMDG20 correctly.
        (iii)  There is hot fix related to this matter too but I do not think it's related to this problem you can try this also. KB article for this hotfix is 952195.
      


    Thanks
    Gyan


    Tuesday, March 10, 2009 4:14 AM
  • Hi Gyan,
    I changed the edifact delimeters for the receive pipeline and still got the same error message. Do I have to change other values as well?
    My UNA segment : UNA:+,?*'
    My efact delimeters: 0x3A, 0x2B, 0x2C, 0x3F, 0x2A, 0x27 (Configure pipeline  - EdiReceive Dialog)

    Thanks
    Furtok


    Tuesday, March 10, 2009 7:25 AM
  • I think you are using CRLF as segment terminator suffix. So you need to set CRLF in Pipeline also.

    You can change the EFACT delimeters in pipeline to :

    0x3A, 0x2B, 0x2C, 0x3F, 0x2A, 0x27, 0x0D, 0x0A

    0D is for CR and 0A for LF


    Hope this work for you!



    Thanks
    Gyan
    Tuesday, March 10, 2009 10:08 AM
  • Hi Gyan,
    thanks for your help. Unfortunately error 4: Invalid Segment Terminator will occur if I'm using the suggested EFACT delimeters.
    Regards
    Furtok
    Tuesday, March 10, 2009 11:24 AM
  • Can you send the file or can paste some starting part here such that I can repro your problem. Actually Looking on file you can only decide the delimiters.

    0x3A, 0x2B, 0x2C, 0x3F, 0x2A, 0x27, 0x0D, 0x0A
    UNA segment was:
    UNA:+,?*'




    Thanks
    Gyan
    Tuesday, March 10, 2009 12:35 PM
  • Hi Gyan,
    here is a sample file:

    UNB+UNOA:2+SENDER+RECIPIENT+090304:12
    30+UNIQUEID1234+++++SHIPPINGLINE'
    UNH+SENDER123+BAPLIE:D:95B:UN:SMDG20'
    BGM++M1+9'
    DTM+137:0903031447:201'
    TDT+20+VOYAGENO123+++CARRIERID:172:20+++DLHV:103:ZZZ'
    LOC+5+EGPSD:139:6'
    LOC+61+GRPIR:139:6'
    DTM+132'DTM+133'
    LOC+147+0030586::5'
    MEA+WT++KGM:10000'
    LOC+9+EGPSD:139:6'
    LOC+11+ITSPE:139:6'
    LOC+83+AFQLT:139:6'
    RFF+BM:1'
    EQD+CN+TOLU 2566410+22G0+1++5'
    DGS+IMD+2.3+2198+045:CEL+I+F-CS-U+16++8'
    FTX+AAD+++PHOSPHORUS PENTAFLUORIDE:109.0'
    UNT+18+SENDER123'
    UNZ+1+UNIQUEID1234'

    This sample doesn't work. But if I include UNA:+,?*' it will.
    I think you are absolutely right and the problem comes with LF and CR. If I write the sample in one line it will work without UNA segment.

    Thanks
    Furtok

    Tuesday, March 10, 2009 2:14 PM
  • Hi,
        I used this sample file But may be you have created some custom schema also.

    I modified some fields of your instance for making compatible with schema EFACT_D95B_BAPLIE.xsd . And then I modified receive pipeline's EFACT delimeters to 0x3A, 0x2B, 0x2C, 0x3F, 0x2A, 0x27, 0x0D, 0x0A .

    It worked fine.

    following is the modified instance:

    UNB+UNOA:2+SENDER+RECIPIENT+090304:1230+UNIQUEID1234+++++SHIPPINGLINE'
    UNH+SENDER123+BAPLIE:D:95B:UN:SMDG20'
    BGM++M1+9'
    DTM+137:0903031447:201'
    TDT+20+VOYAGENO123+++CARRIERID:172:20+++DLHV:103:ZZZ'
    LOC+5+EGPSD:139:6'
    LOC+61+GRPIR:139:6'
    DTM+132'
    DTM+133'
    LOC+147+0030586::5'
    MEA+WT++KGM:10000'
    LOC+9+EGPSD:139:6'
    LOC+11+ITSPE:139:6'
    LOC+83+AFQLT:139:6'
    RFF+BM:1'
    EQD+CN+TOLU 2566410++1++5'
    DGS+IMD+2.3+2198+045:CEL+1+F-CS-U+16++8'
    FTX+AAD+++PHOSPHORUS PENTAFLUORIDE:109.0'
    UNT+18+SENDER123'
    UNZ+1+UNIQUEID1234'




    Thanks
    Gyan
    • Marked as answer by Furtok Wednesday, March 11, 2009 6:08 AM
    Tuesday, March 10, 2009 5:23 PM
  • Hi Gyan,
    thank you very much for all your help.
    Kind regards
    Furtok
    Wednesday, March 11, 2009 6:09 AM
  • Hi,

    About a year ago I posted a similar problem at the EDI Product Team Blog (http://blogs.msdn.com/biztalkb2b/archive/2006/10/17/edi-processing-modes-in-bts2006-r2.aspx). I was then told that the problem had been corrected in BizTalk 2009. I can confirm that using BizTalk 2009 in conjuntion with Gyans solution works for my case as well.

    Regards
    Klas Ericsson

     

    Monday, April 19, 2010 9:01 AM
  • HI In a message CUSCAR how to identify the goods in transit and transhipment Thanks for your help
    Tuesday, February 1, 2011 12:44 PM