Print Shipment Number based on External Document #

Hi all… 3.7 here. We have some modifications that allow us to enter multiple POs (External Doc No.s) on a single Sales Order. Further, we have a box on our customer card that allows us to invoice the customer based on PO (External Doc No.). For ezample Sales Order SO01255-A has four line items on it: Item A & B under customer PO number 1234 and Item B & C under customer PO number 5678. The invoices would then come out as S-INV001 with Item A & B and S-INV002 with ITEM C & D. All works great with this…BUT…we need to now do a little more. We now need the BOLs (Sales Shipment Report) to assign ship no.s based on POs. Currently the way it ships is that Items A B C & D all ship on BOL1234. We need it to ship Item A & B on BOL1234 and C & D on BOL5678. Hope that makes sense…anyone have any thoughts on this? Some code samples will be greatly appreciated. Thanks, JP