how to post packing slip for picked quantity

Hi All,

I created a sales order line with 10 quantity. I posted 10 quantity picking list and did registration for 10 quantity. Then I unpick 6 quantity. How can I post packing slip for the remaining 4 quantity through code.

Regards,

Raghav