excuse me, someone has some example of accounting for stock Sap Bussines one through di api , it does not work right through me and I need to do one of a web service for a android application consuming the service. I have this does not work , I'm using the version 9.10.150 sap PL 05
Dim oStockTaking As SAPbobsCOM.StockTaking
' Dim oRecord As SAPbobsCOM.Recordset
' oRecord = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
'oRecord.DoQuery("SELECT * FROM MyStockTableTbale")
'oRecord.MoveFirst()
Dim i As Integer
' For i = 0 To oRecord.RecordCount - 1
oStockTaking = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTakings)
oStockTaking.ItemCode = TableLines.Rows(0).Item(0) 'oRecord.Fields.Item("ItemCode").Value
oStockTaking.WarehouseCode = "02"
oStockTaking.Counted = TableLines.Rows(0).Item(2)
If oStockTaking.Add() = 0 Then
MessageBox.Show("Error: " & oCompany.GetLastErrorDescription)
End If
' oRecord.MoveNext()
' ReleaseObject(oStockTaking)
' Next
MessageBox.Show("Done Processing")
this is what I have but I Fail