Skip to Content
0
Former Member
Feb 07, 2008 at 10:20 PM

Issue with SAPbobsCOM..oStockTransfer

141 Views

Hi

I am trying to do Inventory transfer, I used code as placed below.

and I wanted to pass BaseRef value, but StockTransfer object does'nt have this property.

and even below code giving the error like "chosen xxxxxxx is not a customerr [wtr1.shipdate][line:3], v9999"

I am passing proper values for CardCode and CardName.

SAPbobsCOM.StockTransfer oInvTransfer;

oInvTransfer= (SAPbobsCOM.StockTransfer)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransfer);

oInvTransfer.CardCode = oPurchaseOrder.CardCode;

oInvTransfer.CardName = oPurchaseOrder.CardName;

oInvTransfer.Comments = oPurchaseOrder.Comments;

oInvTransfer.FromWarehouse = "02";

oInvTransfer.Lines.ItemCode = line.Substring(6, 20).Trim();

oInvTransfer.Lines.Quantity = System.Convert.ToDouble(line.Substring(36, 15));

oInvTransfer.Lines.WarehouseCode = "02"; //line.Substring(3, 3);

oInvTransfer.Lines.Add();

result = oInvTransfer.Add();

Can any one help me in this case.

thanks in advance

kv reddy