none
Add UNB Segment nodes to standard EDIFACT-D93A-Orders schema RRS feed

  • Question

  • Hi,

    i want to added UNB Segment nodes to standard EDIFACT-D93A-Orders schema. if it is possible how to do that step by step?. please give us a sample.

     

    Regards,

    kishore.

     

     

    Monday, October 31, 2011 8:15 AM

Answers

  • No, the only way to manipulate UNA and UNB (again without using the prefered Party set up), is by overwriting some context properties in either a pipeline or an orchestration.

    http://technet.microsoft.com/en-us/library/dd223988(BTS.70).aspx

    Actually some functoids has been created that can access the context properties, but I very seldom recommend them, since they are somewhat limited (some of them only works in maps if they reside in an orchestration and so on).

    Morten la Cour

    Tuesday, November 1, 2011 6:44 AM
  •  

    ok, My destination schema having  distingwish field named as 'To'. that filed values set like this at orchestration level.

    MyDestinationSchema.To=EDI.UNB1.1

    is it possible to assign UNB sender information?

    I think we can access UNB information at orchestration level.


    Tuesday, November 1, 2011 7:03 AM
  • Yes you set the EDI.OverrideEDIHeader to true, and then you specify the UNA and UNB segment as you want it to appear.

    Please mark my replies as answers not just vote them useful if I provide the answer for you.

    Morten la Cour

    Tuesday, November 1, 2011 7:20 AM
  • Are you sending EDIFACT or receiving EDIFACT?

     

     

    Make a reference to Microsoft.BizTalk.Edi.BaseArtifacts.dll

     

    Receiving:

    DestSchema.To = Msg(EDI.Unb31);

    and so on.

     

    Sending and override UNB

    Msg(EdiOverride.OverrideEdiHeader) =true;

    Msg(EdiOverride.Unb31) = SourceSchema.To;

     

    Morten la Cour


    Tuesday, November 1, 2011 11:51 AM
  • These questions has nothing to do with EDI anymore, please close this discussion so it doesn't get too long, and ask a general mapping question in the BizTalk General forum.

    Morten la Cour

    Wednesday, November 2, 2011 7:21 AM

All replies

  • The UNB segment is part of the EDIFACT envelope and not the actual message, therefore the UNA and UNB segment will not appear in the D93A_Order schema, but needs to be set up at a party/agreement level.

     

    Morten la Cour

     

    Monday, October 31, 2011 8:39 AM
  • Hi,

    Thanks for the reply.

     

    at party level we set sender & receiver information but my case UNB Sender & Receiver information is changed for every message then how to do that?

     

    Regards,

    kishore.

     

    Monday, October 31, 2011 8:50 AM
  • Well..You should tell your trading partners that this is not how EDIFACT is supposed to work :-) The UNB segment should be the same no matter what message type resides in the document.

    Unfortunately BizTalk parties do not support multiple UNB segments, and you cannot create multiple parties with the same UNB2.1 and UNB3.1.

    So if you absolutely need the UNB segment to differ for the same party (UNB2 and UNB3) then you need to overwrite EDI headers in either an orchestration or a pipeline component.

    http://technet.microsoft.com/en-us/library/dd223988(BTS.70).aspx

     

    Morten la Cour

    Monday, October 31, 2011 11:50 AM
  • Hi

    as you said earlier like, The UNB segment is part of the EDIFACT envelope and not the actual message, therefore the UNA and UNB segment will not appear in the D93A_Order schema.

    can we access UNB tags information using xslt in destination schema when standard D93A_Order shcema map to destination schema?

     

    Regards,

    kishore.

     

     

     

     

     

    Tuesday, November 1, 2011 4:39 AM
  • No, the only way to manipulate UNA and UNB (again without using the prefered Party set up), is by overwriting some context properties in either a pipeline or an orchestration.

    http://technet.microsoft.com/en-us/library/dd223988(BTS.70).aspx

    Actually some functoids has been created that can access the context properties, but I very seldom recommend them, since they are somewhat limited (some of them only works in maps if they reside in an orchestration and so on).

    Morten la Cour

    Tuesday, November 1, 2011 6:44 AM
  •  

    ok, My destination schema having  distingwish field named as 'To'. that filed values set like this at orchestration level.

    MyDestinationSchema.To=EDI.UNB1.1

    is it possible to assign UNB sender information?

    I think we can access UNB information at orchestration level.


    Tuesday, November 1, 2011 7:03 AM
  • Yes you set the EDI.OverrideEDIHeader to true, and then you specify the UNA and UNB segment as you want it to appear.

    Please mark my replies as answers not just vote them useful if I provide the answer for you.

    Morten la Cour

    Tuesday, November 1, 2011 7:20 AM
  •  

    where can i find this property EDI.OverrideEDIHeader = true at orchestration level?

    I am unable to identify it at orchestration level. please help me.

    Tuesday, November 1, 2011 7:39 AM
  • Msg(EdiOverride.OverrideEdiHeader)  = true;

    Msg(EdiOverride.Unb31) = Source.To;

     

    And so on.

    You don't have to override everything. Some properties can still be set on a party level, but there are some dependencies between the properties (for instance: If you change Unb21 you also need to set Unb31 and so on)

    Morten la Cour


    • Edited by la Cour Tuesday, November 1, 2011 7:57 AM
    Tuesday, November 1, 2011 7:57 AM
  • I want Set the value to DestinactionSchema.To = UNB31 information not Msg(EdiOverride.OverrideEdiHeader)=UNB31

    other one is I am not able to get EDIOverride.OverridEdiHeader  at orchestration level

     

    Tuesday, November 1, 2011 8:35 AM
  • Are you sending EDIFACT or receiving EDIFACT?

     

     

    Make a reference to Microsoft.BizTalk.Edi.BaseArtifacts.dll

     

    Receiving:

    DestSchema.To = Msg(EDI.Unb31);

    and so on.

     

    Sending and override UNB

    Msg(EdiOverride.OverrideEdiHeader) =true;

    Msg(EdiOverride.Unb31) = SourceSchema.To;

     

    Morten la Cour


    Tuesday, November 1, 2011 11:51 AM
  • I am calling this code using Construct message shape. in that I wrote code like

    1. below code written in Message Assignment shape

    Message1=Message2

    Message1.Field=Msg(EDI.UNB21);

    message1.Field is distinguish field

    2. set Construct Message=message1 in construct message property

    Message1 & Message2 both are same type

    but i am get error like "use of UN constructed message Message2"

     

    please help us.

     

     

     


    Wednesday, November 2, 2011 6:17 AM
  • I would assume it is the other way around?

    Isn't Message1 the message already constructed when entering the new construct shape?

    In the case make the new construct shape construct message2 and do the following:

    Message2 = Message1;

    Message2.Field = Msg(Edi.Unb21);

    ...

     

    Morten la Cour

    Wednesday, November 2, 2011 6:29 AM
  • yes, but we are not constucted message1 earlier

    if I tried like above what u said  then it will showing error message is "Use Un construct message Message1"

    Wednesday, November 2, 2011 6:32 AM
  • Well. What constructed message do you have when entering the contruct shape then?

    Morten la Cour

    Wednesday, November 2, 2011 6:41 AM
  •  


    I have One Message Named as Message1. this message having two distingwish fileds

    Message1.To & Message1.From

    so we want to set UNB21 & UNB23 values to 'From' '& To' fields at orchestration level

    we draged message assignment shape

     create New message message2 through orchestration view and give the same type of message1 for message2

    in that write code like Mesage1=Message2

    Message1.TO=EDIMessage(EDI.UNB21)

    Message.From=EDIMessage(EDI.UNB31)

    and set Construct Message=Message1 for Constract Message Shape property

    then compile the application showing error message is "Use un construct message Message2"

    Wednesday, November 2, 2011 6:50 AM
  • Ok so you have the following:

    -Message1

    -Message2

    -Msg

    Now as you tell it right now neither Message1 or Message2 is constructed????

     

    If Non of them are constructed:

    -Make a map from Msg to Message1

    -Make a construct shape set Message = Message1

    -Call Map inside construct shape

    -Make a messsage assignment shape after the map shape with (Message1.Field = Msg(Edi.Unb21)

     

    If Message1 is already constructed:

    Construct Shape Message = Message2;

    Message2 = Message1;

    Message2.Field = Msg(Edi.Unb21);

     

    If Message2 is already constructed:

    Construct Shape Message = Message1;

     

    Message1 = Message2;

    Message1.Field = Msg(Edi.Unb21);

    Morten la Cour

     

    Wednesday, November 2, 2011 7:04 AM

  • here my requirement Msg type is xmlDocument

    Message1 type refer to the .xsd file

    Message2 type refer to  same .xsd file of Message1 refers

    If Non of them are constructed:

    how to map Msg to Message1?

    If Message1 is not constructed then i tried below:

    Construct Shape Message = Message2;

    Message2 = Message1;

    Message2.Field = Msg(Edi.Unb21);

     that time use un constructed message error showing

    If Message2 is not constructed then i tried below:

    Construct Shape Message = Message1;

     

    Message1 = Message2;

    Message1.Field = Msg(Edi.Unb21);

     that time use un constructed message error showing
    Wednesday, November 2, 2011 7:18 AM
  • These questions has nothing to do with EDI anymore, please close this discussion so it doesn't get too long, and ask a general mapping question in the BizTalk General forum.

    Morten la Cour

    Wednesday, November 2, 2011 7:21 AM