Posting partial Shipment of Transfer order

Can anyone provide me the code to partially update the shipment of a transfer order ?

I have created a Transfer order for 10 qty , now I want to ship 4 qty through code ?

Can anyone help me on this?

Can anyone please help me on this


This should help -