Skip to Content
0
Former Member
Jun 06, 2008 at 11:05 AM

Batch Number creation through DIAPI

36 Views

Dear all,

i tried batch number creation through DIAPI.. but its shows error message [WTR1.Whscode][Line:1],'No matching Records found(ODBC-2028)' any body helpme in this regard..

thanks in advance.. here i have attached my coding..

Dim objLines As SAPbobsCOM.StockTransfer_Lines

objForm = objAddOn.objApplication.Forms.Item(FormUID)

Dim objStockTransfer As SAPbobsCOM.StockTransfer

objStockTransfer = objAddOn.objCompany.GetBusinessObjectSAPbobsCOM.BoObjectTypes.oStockTransfer)

objStockTransfer.DocDate = System.DateTime.Today

objStockTransfer.TaxDate = System.DateTime.Today

objStockTransfer.FromWarehouse = "01"

objStockTransfer.PriceList = 1

objStockTransfer.Lines.ItemCode = "B000001"

objStockTransfer.Lines.Quantity = "1"

objStockTransfer.Lines.WarehouseCode = "BAP"

objStockTransfer.Lines.BatchNumbers.BatchNumber = "B10"

objStockTransfer.Lines.BatchNumbers.Quantity = "1"

objStockTransfer.Lines.BatchNumbers.Add()

If objStockTransfer.Add <> 0 Then

objAddOn.objApplication.SetStatusBarMessage(objAddOn.objCompany.GetLastErrorDescription, SAPbouiCOM.BoMessageTime.bmt_Short, True)

objAddOn.objApplication.MessageBox(objAddOn.objCompany.GetLastErrorDescription)

Else

objAddOn.objApplication.SetStatusBarMessage("Inventory Transfered Successfully", SAPbouiCOM.BoMessageTime.bmt_Short, False)

End If

With Regards

G.shankar Ganesh