1
votes

Is it possibme to have an empty segment. Like for exemple the segment PAC in the exemple below:

   ... 
   LOC+9+ESALG'
   PAC' 
   PCI++1' 
   ...
1

1 Answers

1
votes

It depends on the specification, so check against the version and message type. According to the EDIFACT syntax rules (): "A conditional segment for which only the segment tag is present shall be omitted in its entirety." So if the segment is mandatory and none of its elements are mandatory, you must leave it in the message. If it has mandatory elements, you must add them.

For your PAC example: You didn't mention the message type/version you want to conform to. If we assume a DESADV message, version 01B, you can find the specifications at https://www.unece.org/trade/untdid/d01b/trmd/desadv_c.htm.

The PAC segment (which has no mandatory elements) is mandatory for segment group 11. Segment group 11 is itself conditional, and there are no other segments from that group present in your snippet. (LIN is from the next group, segment group 17) So if you're not providing information (it is empty after all) you should take it out. I can't find anything in the syntax specification that requires you to take it out (unlike it states for segments). But I'm not an EDIFACT expert.

It also depends on the receiver of the message, and how it handles this situation. Regardless of the exact specification, you're dealing with possibly buggy implementations of the standard. So testing is advised.