How to do Shipment of only picked Item through Code


How can I make shipment of only picked Items by using X++ Code.

Suppose, I am having one Item IT-001 having order quantity=100. and I wanted to make shipment of this. So, first I created picking of only 50 Item,and wanted to make shipment of only those 50 Items which were picked.

So for doing this manually I can go to SalesEditLines form and make shipment of only Picked quantity items, but how can I do his process with code.