当我在SAP Business One中运行简单的附加组件时,我遇到了问题。我通过以下代码片段得到了这个例外:
' After changing the item quantity
If (pVal.ItemUID = "mat") And (pVal.ColUID = "ActQuan") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE) Then
Dim oEditPrice As SAPbouiCOM.EditText ' Item Price
Dim oEditTDTotal As SAPbouiCOM.EditText ' To Date Total
Dim oEditTDQuan As SAPbouiCOM.EditText ' To Date Quan
Dim oEditCuttings As SAPbouiCOM.EditText ' Cuttings
Dim oEditTotal As SAPbouiCOM.EditText ' Total = TDTotal - Cuttings
Dim oEditActQuan As SAPbouiCOM.EditText
' Get the items from the matrix
oEditPrice = colItemPrice.Cells.Item(pVal.Row).Specific
oEditTDTotal = colItemTDTotal.Cells.Item(pVal.Row).Specific
oEditTDQuan = colItemTDQuan.Cells.Item(pVal.Row).Specific
oEditTotal = colItemACuttings.Cells.Item(pVal.Row).Specific
oEditCuttings = colItemCuttings.Cells.Item(pVal.Row).Specific
oEditActQuan = colItemActQuan.Cells.Item(pVal.Row).Specific
' Copy the value of TDQty
Dim tmpInt As Integer
tmpInt = CInt(oEditActQuan.Value)
oEditTDQuan.Value = CInt(tmpInt)
' Copy the value of TDTotal
Dim tmpIn As Integer
tmpIn = CInt(oEditTDQuan.Value) * CInt(oEditPrice.Value)
oEditTDTotal.Value = CInt(tmpIn)
'Calc Total Row - ACuts
Dim tmpTotal As Integer ' temp variable to contain total result
tmpTotal = CInt(oEditTDTotal.Value) - CInt(oEditCuttings.Value)
oEditTotal.Value = CInt(tmpTotal)
' Calc the document total
Dim CalcTotal As Double
Dim i As Integer
CalcTotal = 0
' Iterate all the matrix rows
For i = 1 To oMatrix.RowCount
oEditTotal = colItemACuttings.Cells.Item(i).Specific
CalcTotal += oEditTotal.Value
Next
oDocTotal.Value = CalcTotal
End If
End If
End If
我使用VB.Net。我对ColUID =“ActQuan”有疑问。谁能帮我 ? 我多次更改此列并出现同样的错误。