IDoc → XML
Parses an SAP IDoc flat file: the first record (if it starts with "EDI_DC40") becomes the control record, read at EDI_DC40's standard field positions; every other line is a data segment, split into its name (first N characters, N configurable) and its raw content (SDATA) -- segment field layouts aren't in a flat file, so SDATA is kept as one opaque field.