I have and EDI 810 source file which looks like the attached file. I need to concatenate all of the REF*SN lines so that the serial numbers appear on the same line as the line above it.
In short, these lines of the attached EDI file:
Need to look like this:
I can handle the mapping from EDI to XML, but the serial numbers on different lines are giving me trouble. I've tried splitting and combining the docs and mapping to XML, but that doesn't seem to work. Do I need to use Groovy scripting to accomplish this, or is there a way to do it from within a map?