Skip to Content
0
Dec 18, 2014 at 02:39 PM

Set Bin Location using DI API

1291 Views

Hi,

I have to add an AR Invoice using DI API, Code is given below

oInvoice.CardCode = frmWizardGenerate.DataSources.UserDataSources.Item("UDCCode").ValueEx

oInvoice.CardName = frmWizardGenerate.DataSources.UserDataSources.Item("UDCName").ValueEx

oInvoice.DocDate = Date.ParseExact(strFromDate, "yyyyMMdd", provider)

oInvoice.DocCurrency = frmWizardGenerate.DataSources.UserDataSources.Item("UDCurr").ValueEx

oInvoice.Address1 = frmWizardGenerate.DataSources.UserDataSources.Item("UDAddress").ValueEx

loooop

oInvoice.Lines.ItemCode = oRecodSet.Fields.Item("ItemCode").Value

oInvoice.Lines.Quantity = oRecodSet.Fields.Item("QtyKg").Value

oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders

oInvoice.Lines.BaseEntry = strDocEntry

oInvoice.Lines.BaseLine = oRecodSet_2.Fields.Item("LineNum").Value

oInvoice.Lines.UnitPrice = oRecodSet_2.Fields.Item("Price").Value

oInvoice.Lines.TaxCode = oRecodSet_2.Fields.Item("TaxCode").Value

oInvoice.Lines.WarehouseCode = oRecodSet.Fields.Item("StoreGrp").Value

oInvoice.Lines.BatchNumbers.BatchNumber = oRecodSet.Fields.Item("BatchNum").Value

oInvoice.Lines.BatchNumbers.Quantity = oRecodSet.Fields.Item("QtyKg").Value

oInvoice.Lines.BatchNumbers.AddmisionDate = dtDocDate

oInvoice.Lines.Add()

looooop END

intError = oInvoice.Add()

Above code does not mention the BIN Location. Please tell me show to set the Bin Location in the Batch.

Thank You