Buenas gente…un cordial saludo…
Quisiera consultar algo: Estoy trabajando con el visual studio, uso el control datagridiew, en la cual muestro las ubicaciones de mi deposito(DepositoGral), tiene tres ubicaciones (UbicaA,UbicaB,UbicaC).
En la grilla se muestra esas ubicaciones con sus respectivas cantidad en stock.
La ideas es colocar otra columna que diga: “Envios”…ahi ir colando la cantidad que quiero transferir a la UbicaC, osea UbicaA = 5 y UbicaB = 5, total 10 a la UbicaC.
Como seria tal procedemiento.?
muchas gracias…
Hola @MarioRiveros
Lo siguiente te podria servir como base.
Dim RetInt As Integer
Dim oInvTransfer As SAPbobsCOM.StockTransfer
oInvTransfer = objSBOAPI.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransferDraft)
Try
oInvTransfer.DocObjectCode = SAPbobsCOM.BoObjectTypes.oStockTransfer
oInvTransfer.DocDate = DocDate
oInvTransfer.TaxDate = TaxDate
oInvTransfer.DueDate = DueDate
oInvTransfer.FromWarehouse = FromWarehouse
oInvTransfer.ToWarehouse = ToWarehouse
oInvTransfer.Lines.ItemCode = ItemCode
oInvTransfer.Lines.Quantity = Quantity
oInvTransfer.Lines.FromWarehouseCode = FromWarehouseCode
oInvTransfer.Lines.WarehouseCode = WarehouseCode
oInvTransfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batFromWarehouse
oInvTransfer.Lines.BinAllocations.BinAbsEntry = BinAbsEntry ''(SELECT AbsEntry FROM OBIN WHERE BinCode='')
oInvTransfer.Lines.BinAllocations.Quantity = Quantity
oInvTransfer.Lines.BinAllocations.Add()
oInvTransfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batToWarehouse
oInvTransfer.Lines.BinAllocations.BinAbsEntry = BinAbsEntry ''(SELECT AbsEntry FROM OBIN WHERE BinCode='')
oInvTransfer.Lines.BinAllocations.Quantity = Quantity
oInvTransfer.Lines.BinAllocations.Add()
oInvTransfer.Lines.Add()
RetInt = oInvTransfer.Add
If RetInt <> 0 Then
objSBOAPI.oCompany.GetLastError(objSBOAPI.oCompany.GetLastErrorCode, objSBOAPI.oCompany.GetLastErrorDescription)
MsgBox(objSBOAPI.oCompany.GetLastErrorCode & " - " & objSBOAPI.oCompany.GetLastErrorDescription)
End If
Catch ex As Exception
objSBOAPI.SBO_Appln.MessageBox(ex.Message)
Finally
System.Runtime.InteropServices.Marshal.ReleaseComObject(oInvTransfer)
GC.Collect()
End Try
Andres Ramirez Jaramillo
1 me gusta
Muchisima gracias Andres…
Este tema se cerró automáticamente 91 días después del último post. No se permiten nuevas respuestas.