none
Biztalk 2010 - EDI - Grabbing a specific Shipping address RRS feed

  • Question

  • I have a customer that sends a 850 with three different shipping addresses, one for N101-BF(Billed From), N101-ST(Ship to), and N101-IT(Invoice To).  I only want to grab the N101-ST address segment. I have tried index functoids but I still get two trailing shipping address tags in my XML file.  Kind of hard to explain but look below at my examples: (.edi file, script, and xml output).

    EDI 850 example

    N1*BF*Company*59*3TRU00007~
    N3*DEPT CH 55555~
    N4*Owatonna*MN*60055~
    PER*ZZ**TE*507-555-555~
    N1*IT*Company CORPORATION Attn: A/P*98*P2222~
    N3*P.O. BOX 555~
    N4*Town*MN*55555-0000~
    N1*ST*Company Corporation*54*BPPRT1~
    N3*100 Ave E Docks 1-3~
    N4*Town*MN*55555~

    Script Example

    Function MyFunction16( p_strParm0, p_strParm1 )
      if (p_strParm0 = "ST" ) then
         MyFunction16 = TRUE
    else
         MyFunction16 = ""
      end if
    End Function

    XML Output Result

    - <Order>
      <ShippingAddress /> -(BF) - Segment :( Want Gone
      <ShippingAddress /> -(IT) - Segment :( Want Gone
    - <ShippingAddress>
      <Line1>5555 PACKER DRIVE</Line1>
      <Line3>Town</Line3>
      <State>WI</State>
      <ShipToName>Company, Inc.</ShipToName>
      <ZipCode>55555</ZipCode>
      </ShippingAddress>

     


    • Edited by Weezle11 Friday, September 9, 2011 4:11 PM
    • Moved by Ben Cline1Moderator Sunday, September 11, 2011 1:59 AM related to edi (From:BizTalk Server General)
    Friday, September 9, 2011 4:10 PM

Answers

  • You can use the equal functoid and the value mapping functoid to achieve this.
    Cheers,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Monday, September 12, 2011 6:59 AM

All replies

  • Hi,

    You need to concatenate N1 segments and then you require to split the ST specific address.

    OR

    You need to use value mapping functoid. Perform the value mapping on N101 with "ST" and then map N102 to the address in the destination.


    Best Regards, Vishnu
    Sunday, September 11, 2011 6:13 AM
  • You can use the equal functoid and the value mapping functoid to achieve this.
    Cheers,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Monday, September 12, 2011 6:59 AM