Skip to Content
0
Nov 22, 2012 at 11:03 AM

Merging Rows in a message

21 Views

Hi

I have a file to idoc scenario. The incoming message has several rows, some of which have duplicate reference numbers, which indicate a VAT row

What I want to do is to create a single VAT node when 2 rows on the input file are encountered

EG incoming message

Ref Seqquence Amount

aaaa 0001 10

aaaa 0002 2

bbbb 0003 17

cccc 0004 90

dddd 0005 20

dddd 0006 4

This will create node EF1SET

Ref Sequence Amount tax amount

aaaa 0001 10 2

dddd 0005 20 4

Is there a UDF which will allow this to be done

I was looking at this thread http://scn.sap.com/thread/3239490 which allows only duplicates to be mapped

which is similar to my requirements, but I want to create a single output row when a duplicate is encounterd