Hi Emerson,
specifying an output array on LOOP step will only work when the resulting list does have exactly the same number of entries as list specified as input array.
I partially agree with Kasi that calling appendToList as a transformer is not needed here.
Remember to drop the fromItem after the invocation before entering the next iteration of the loop otherwise you will encounter a mix up of data between the entries.
But I would suggest to use cascaded loops here (inside the loop for /DESADV_OUT_LINE):
- Outer Loop for LIN
- Inner Loop for PIA
Additionally you might need to use temp lists during the loops to avoid duplication of entries while appending.
When one loop completes map the resulting temp list back to the list in the document structure while replacing the original list and drop the temp list afterwards. Otherwise you will have the incoming list extended by the same, now enriched, entries.
Can you share some samples of the documents prior entering the loop and what they should look like after the transformation?
Regards,
Holger
#webMethods#B2B-Integration#edi