Hi Experts,
I have a RFCLookup that sends Material Numbers to an FM and retrieves serial numbers for these Material numbers (1st column). There can be multiple serial numbers (4th column) returned for every Material number. Is there a way to identify and group serial numbers from the same material numbers together? I can only identify which of the resulting values are from which Mat Number by looking at the 5th column.

This is the 5th column, now I can see that 1 serial# was returned for the 1st Mat Number and 2 serial# was returned for the 2nd Mat Number

I need to group the resulting Serial numbers from the RFC lookup so I can use it in the use one as many function below.

My goal is to display all serial numbers with the correct MATDOC_ITM, but I can't seem to get the correct value of MATDOC_ITM. The MATDOC_ITM should be the PurchaseOrderLineNumber of the Material Number used in the lookup. See target structure below.

Sample Source sturcture

Thanks in advance!