I'm programming a production receipt in SAP. AS you know, sap doesn't have objtects to work with receipts, so i do an inventory entry and then i make this update to IGN1:
Rs.DoQuery "UPDATE IGN1 set BaseType=202, baseentry = " & DocNum & ", baseline = 0 where docentry = " & NewCode
Where newcode is the new code for the last inventory entry.
That works OK, but yesterday, when a did an inventoryentry.Add, this error surprise me!
.Add= -10
Error Message= No Price[OIGN.Doctotal]
If i add a value to DocTotal, this error doesn't happens, but my question is why now i need to use doctotal to avoid this error, and i don't want to use it, because doctotal is a value that i don't have so i put any value.
This is the code:
BoIGE.CardCode = CardCode
BoIGE.DocDate = DocDate
BoIGE.DocDueDate = DocDueDate
' **********************************
' *********** PRUEBA ***************
'BoIGE.DocTotal = Coste * Quantity1
' ************* FIN PRUEBA **********
'campos de usuario a nivel de cabecera en Recibo
BoIGE.Lines.ItemCode = ItemCode
BoIGE.Lines.Quantity = Quantity1
BoIGE.Lines.AccountCode = "61020001"
BoIGE.Lines.WarehouseCode = WhsCode
BoIGE.Lines.BaseType = 0
BoIGE.Lines.BaseLine = 0
BoIGE.Lines.BaseEntry = BaseEntry
BoIGE.Lines.Add
BoIGE.Add
After that, i do the SQL Update.(but BoiGE.Add gives me the error)
Any idea?