DTS integration to create SOP transaction with multiple lines and multiple payments applied

My source query looks like the following

invoice number ItemNumber paymentNumber paymentamt

INV001 itemA 1 $100

INV001 itemB 1 $100

INV001 itemA 2 $200

INV001 itemB 2 $200


In smartconnect you can group things together on a certain node, however in scribe there doesn't appear a way to group this. I need to way to skip steps as I don't want to process rows 3 and 4 a second time. I know I can use skip rows when values duplicate, however this reset after the second payment is processed.