on 10-30-2009 9:51 AM
Hi, All
I want to generate "Receipt From Production Via DI API " with Component Item are Back flash. but it gives an error --
"Reference Production Order issue type should be manual".
Is it possible to generate Receipt From Production for Back flash Component.
Thank in Advance.
thanks
I done it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
issue from production for item type backflush are automatical when you create recipt from production as
inv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
inv.Lines.BaseEntry = doc_entry
inv.Lines.BaseType = 202
inv.Lines.Quantity = 1
inv.Lines.TransactionType = SAPbobsCOM.BoTransactionTypeEnum.botrntComplete
inv.Lines.WarehouseCode = "01"
inv.Lines.Add()
inv.Lines.BaseEntry = doc_entry
inv.Lines.BaseType = 202
inv.Lines.Quantity = 1
inv.Lines.TransactionType = SAPbobsCOM.BoTransactionTypeEnum.botrntReject
inv.Lines.WarehouseCode = "02"
err_code = inv.Add()
By this is create issue and receipt at once.
When you create issue for production for manual type items, you have to use something like:
RecSet.DoQuery("SELECT LineNum, baseqty, warehouse FROM wor1 where docentry=" + CStr(doc_entry) + " and issuetype='M'")
inv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)
bAdd = False
If RecSet.RecordCount > 0 Then
RecSet.MoveFirst()
While Not RecSet.EoF
If bAdd Then
inv.Lines.Add()
Else
bAdd = True
End If
line = RecSet.Fields.Item(0).Value
base_qty = RecSet.Fields.Item(1).Value
whs= RecSet.Fields.Item(2).Value
inv.Lines.BaseLine = line
inv.Lines.BaseEntry = doc_entry
inv.Lines.BaseType = 202
inv.Lines.Quantity = base_qty * plan
inv.Lines.WarehouseCode = whs
RecSet.MoveNext()
End While
End If
err_code = inv.Add()
hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.