posting product receipt

can someone help me to post product receipt through code for purchase order?