Deep documents vs shallow documents

I would like to get some opinion from others about using shallow documents instead of deep documents for EDI mapping.
What I mean here is, the EDI module installed document types are exhaustive and have all the possible segments and elements all of which may not be required for a given mapping requirement.
In such cases (which to my experience is most of the time) does it make better sense to use shallow documents which has only the elements which are relevant to the requirement ?


It is better if you use a shallow copy of the document rather than using the installed doc, so that you have only the fields which have to be mapped.and it doesn’t make any difference even if you use a deep copy of the doc.


ramesh wrote:
“It is better if you use a shallow copy of the document…”

Can you elaborate on “better?” IMO, using the installed document definitions intead of a custom subset simplifies maintenance, avoids definition errors and avoids duplicate doc definitions. Using the segment mapping approach described in the wM EDI docs helps reduce the clutter of the full definitions when mapping.

To avoid definition errors what I do is define the wmEDI installed doc type as an input parameter in the input tab of the flow service which does the mapping. This allows me to have all the elements with their proper EDI names in the mapping steps.
Once the mapping is complete, I go back to the input tab and make the document a shallow one. As a result my mapping steps look simple (because the document type does not show the whole EDI tree of segments and elements) and I am still able to use the valid EDI names.
Do you see any problem with that ?

It’s not that I see a problem with reducing the structure, it’s more that I see no real advantage. Anyone that is familiar with EDI structures generally has no problem ignoring unused segments and quickly navigating to segments of interest. Indeed, the surrounding segments can help one quickly visually locate a segment of interest based on its relative location.

I am not a fan of customizing standard structures and I don’t believe the use of reduced structures provides any benefits but can only introduce hard-to-find errors during maintenance (e.g. “Did I add in all the right levels for the previously unused segment that we are now using?”).


“better”------i mean mapping would be easy…but comes with extra maintainence overhead.



Yemi Bedu

I agree with Yemi’s way of edi segment mapping,we also follow the same pattern mapping of individual segments and invokes it in main maps when it is generic depends on the version compatibility.



Yemi Bedu

The “Divide-and-Conquer” approach can be taken to the extreme when you have a fairly standardized internal document such as SAP IDocs. Then your message mappings would become just a mix of mostly common segment mappings (such as DTM to IDocs E1EDK03/EDP03) and a small portion of message-specific mappings. Object reuse at its best!