Hi @malue,
Each time you do ship and invoice for any sales order, a Shipment Document and Invoice Document are created for each posting, but if you do multiple shipments and invoices at the end then you will have multiple shipment documents and 1 invoice document. In simple terms, for 1 sales order, you can have multiple shipment documents either only one invoice or multiple.
Now if I suppose every time when you post an Order you are selecting Ship & Invoice, then, in this case, the same number of Posted Shipment Document and Posted Invoice Document will create, then you can easily filter, the lines start with Order No. on any Posted Shipment or Invoice Headers, now look for their lines and filter based on Item No. and Qty from one Line table to another.
Extras:
May below image will help to know SO Posting process.....
