Hello, I am using Enprise Add-On for Job Costing. This add-on adds the tables below to SAP company database. I had built an enhancements add-on for our company and fill a Matrix with data from a few joined tables in the list below.
I can't seem to be able to update any of these tables using the SAP com objects. The SAPbobsCOM.UserTable does not recognize the Enprise tables. Below is some code that I was trying. Can anyone give example on how I can accomplish this? Any help is deeply appreciated.
Thanks,
Mike
Dim tblJobLines As SAPbobsCOM.UserTable
tblJobLines = OMComp.UserTables.Item("ENPRISE_JOBCOST_JOBLINES")
Dim tblSubJobs As SAPbobsCOM.UserTable
tblSubJobs = OMComp.UserTables.Item("ENPRISE_JOBCOST_SUBJOB")
Dim sSEQNO As String = ""
Dim sSUBJOB As String = ""
Try
For i As Integer = 0 To tblQuotes.Rows.Count - 1
sSEQNO = tblQuotes.Columns.Item("SEQNO").Cells.Item(i).Value
sSUNJOB = tblQuotes.Columns.Item("SUBJOB").Cells.Item(i).Value
tblJobLines.GetByKey(sSEQNO)
tblSubJobs.UserFields.Fields.Item("ENTEREDDATE").Value = CType(tblQuotes.GetValue("ENTEREDDATE", i), Date)
tblJobLines.UserFields.Fields.Item("QTY").Value = CDec(tblQuotes.Columns.Item("QTY").Cells.Item(i).Value)
tblJobLines.UserFields.Fields.Item("ORIGSELLPR").Value = CDec(tblQuotes.Columns.Item("ORIGSELLPR").Cells.Item(i).Value)
Next
tblJobLines.Update()
tblSubJobs.Update()
LoadMatrix() 'Refresh Matrix with updated values
Catch ex As Exception
Throw
Finally
tblJobLines = Nothing
tblSubJobs = Nothing
End Try