The TOTALQTY parameter in a SQP line integration is usually ignored, you can leave it NULL and it'll be fine. The rub comes when you want to do 'shipments'.
In our case, the 3PL was partially fulfilling and the client wanted to leave the SOP ORDER at its full quantity and work the fulfillment.
In other words, if the order was for three and we fulfill one, we want to leave the order at three, partially fulfilled.
If you send though a call to taSopLineIvcInsert with QUANTITY = 1, QTYFULFI = 1, it will fulfil the one and recuce the QUANTITY to one.
The solution is below