1
votes

I have encountered a situation regarding an EDIFACT composite element being marked as mandatory, but with all conditional data elements.

I don't understand how this is possible as the composite will not be rendered if all data elements are not provided. If the first element 1001 was mandatory, then I can understand that, but as it is it doesn't make any sense.

Here is an example:

010    C002 DOCUMENT/MESSAGE NAME                      M    1
       1001  Document name code                        C      an..3
       1131  Code list identification code             C      an..17
       3055  Code list responsible agency code         C      an..3
       1000  Document name                             C      an..35

I find this quite confusing and not sure what to do about such situations. I am currently developing an API in C# to generate and process EDIFACT messages and I am not sure how to validate as well as render the above example.

Can any EDIFACT experts clarify this for me please?

** UPDATE **

I suspect that the composite being mandatory would require at least one of the data elements to be provided -- this is just an educated guess based on common sense and what I already know of EDIFACT.

3
Common sense would prove you correct. I generally have to look at the whole picture rather than focus on one piece. In other words, I'm looking at the ORDERS message, and the UNH segment, and the 03 element (not your example, just semantics of how I talk about these things). If the element is mandatory (part of an envelope) then I know I need to create the elements associated with it. Most translation software will build the envelopes and keep track of the control numbers for you automatically. - Andrew

3 Answers

2
votes

It means indeed that at least one of the sub-elements has to be present. In this case: either use the document code 1001 or the description 1000. Elements 1131 and 3055 have a function somewhat similar to name-spaces in xml.

0
votes

My guess is that's mandatory because it's the first element in the segment, so it needs to be in the segment also if it's empty.

To clarify myself:

  • DOC+' The C0002 element is there but it's null (no data).
  • DOC' Doesn't have sense
0
votes

The C0002 composite is usually used in the BGM segment which is always present in an EDIFACT message, as it is the first segment in the payload and it identifies the current message. BGM.C0002:1001 identifies the message function e.g. BGM+381:...' denotes an Commercial invoice, BGM+382:...' denotes a Credit note

So the C0002:1001 element is always required. The 1131 element identifies a codelist from which the previous value is fetched.

In the element 3055 the agency responsible for that codelist is reported.

The second really important element is the 1000. It is not required by the standard, but usually used for the number identifying the message like invoice number 16/000213

To come to an conclusion: There are two elements which should be treated as mandatory in the C0002: 1001 and 1000.

Basically this also holds true for the DOC segment, where a business document is referenced.