Item can be added through transfer from Purchase Order.
Cancel Purchase Order (document) is not to void Purchase Order.
Partial Transfer
publicvoidNewCancelPO(BCE.Data.DBSettingdbSetting){BCE.AutoCount.Invoicing.Purchase.CancelPO.CancelPOCommandcmd=BCE.AutoCount.Invoicing.Purchase.CancelPO.CancelPOCommand.Create(dbSetting);BCE.AutoCount.Invoicing.Purchase.CancelPO.CancelPOdoc=cmd.AddNew();//Transfer one line of item from PO, if more than one line, write a loopstringpoDocNo="PO-00001";stringitemCode="ItemA";stringuom="UNIT";decimalqtyToTransfer=1;decimalfocQtyToTrasnfer=0;//Using Partial Transferdoc.PartialTransfer(BCE.AutoCount.Invoicing.Purchase.TransferFrom.PurchaseOrder,poDocNo,itemCode,uom,qtyToTransfer,focQtyToTrasnfer);try{doc.Save();//log save successful}catch(BCE.Application.AppExceptionex){//log exception}}