none
How to calculate(extract) number of segments in EDIFACT message? RRS feed

  • Question

  • Hello dear gurus

    I have a task to map into UNH1 field custom value.  It should be equal to "Number of segments in message".

    I do it as follwoing and it works fine:
    EDI_Mes(EdiOverride.UNH1)= "Number of segments in message".

    This number of segments is actuall stored in controlling UNT segment  in first position and generated by BizTalk itself.

    Is there way to get this valued during constructing message inside orchestration? Or if it is not possible just to calculate in some way?
    Thursday, September 10, 2009 9:36 AM

Answers

  • You might try promoting the UNT segment if this is part of the schema. Then you could refer to it in the expression statement.

    Another approach I have used on the X12 side is the Record Count functoid to handle counting repeating nodes in a message for an EDI CTT01 segment. This might be another way to handle this requirement for you.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Friday, September 11, 2009 6:40 PM
    Moderator

All replies

  • You might try promoting the UNT segment if this is part of the schema. Then you could refer to it in the expression statement.

    Another approach I have used on the X12 side is the Record Count functoid to handle counting repeating nodes in a message for an EDI CTT01 segment. This might be another way to handle this requirement for you.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Friday, September 11, 2009 6:40 PM
    Moderator
  • Thank you Ben

    The problem is that I have not found the promotion of UNT in message context.

    So the straight way is to calculate it manually, I also was thinking about it, but it is little bit complex in case of EDIFACT

    Anyway thank you for directin me in right way!
    Saturday, September 12, 2009 9:06 AM