cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with SAPbobsCOM..oStockTransfer

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi kv reddy,

I think the error message is pretty clear. The bussines partner you're selecting is not a customer. The stock transfer only allows you to select customers.

I think what you're trying to do is a Goods Receipt PO. If so you're using the improper object. You shall you the documents object instantiated as a Goods Receipt PO.

Hope this helps,

Ian

Former Member
0 Kudos

IAN

Thanks for the quick reply

I am using stocktransfer object only not the goods receipt object (oPurchaseDeliveryNotes)

could you please send me sample code if you have any.

thanks

kv reddy

Former Member
0 Kudos

I resolved the issue

just i stopped to pass cardno and card name values to the object.

thanks

Former Member
0 Kudos

hi Ian,

Am trying to create Goods Receipt Po thru DI API.

But am not able to find the object to use...

In some of your post you mentioned that we have to use document object to instantiate GrP0.

can u please provide me with the code ....

Am also looking for objects like

Issue,consumtion....

It will be great help from you if you please provide me with the code...

Thanks

Former Member
0 Kudos

Hi Mayur,

There're all part of the Documents object. To instance a Good Receipt PO do (VB.NET):

Dim oGrPO As SAPbobsCOM.Documents
oGrPO = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)

It's all documented in the SDK Helpcenter.

Can you be a little more specific about issue and consumption?

Hope this helps,

Ian

Former Member
0 Kudos

hey thanx lan

I tried and its working bro..thanks

well sdk help centre .. you mean to say online SDK HELP?

hey how can i give ya reward points.. well am new to this forum so can i know how can i do that.. ?

Edited by: Mayur Rathod on Mar 30, 2008 1:20 PM