on 05-06-2009 9:34 AM
Dear all,
I made a test program with the purpose of Goods receipt and update OnHand quantity of given Item on
designated warehouse; the result is -- Goods receipt created succefully, but Onhand qty not updated,
My code is as follow (in VB6), would greate appreciated on your big help:
Dim oDoc As SAPbobsCOM.Documents
Dim Flag, Err1 As Integer
Set oDoc = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
oDoc.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service
'create the receipt from production
'on the basis of production order just created
oDoc.DocDate = Now
oDoc.Lines.ItemCode = "1234567_89ABCDXYZ"
oDoc.Lines.AccountCode = "715001"
oDoc.Lines.Quantity = 98
oDoc.Lines.Price = 24
oDoc.Lines.WarehouseCode = "P01"
oDoc.Lines.BatchNumbers.BatchNumber = "C01"
oDoc.Lines.BatchNumbers.Quantity = 98
oDoc.Lines.BatchNumbers.SetCurrentLine (0)
Flag = oDoc.Add()
If Flag <> 0 Then
oCompany.GetLastError lErrCode, sErrMsg
MsgBox lErrCode & " " & sErrMsg
End If
The problem is in line
oDoc.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service
Service type document doesnt change the quantity on stock.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.