Skip to Content
0
Former Member
Mar 24, 2009 at 08:33 AM

Doubt On "How to insert data into userdefined table"

21 Views

This is the code i written for insert into user defined table but this code is not working..plz help me by sending correct solution.

Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent

Dim oUserTable As SAPbobsCOM.IUserTable

If ((pVal.FormUID = "FormCost11") And (pVal.ItemUID = "1") And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then

oUserTable = oCompany.UserTables.Item("@COST_SHEET")

oUserTable.Code = "1" /// *what is the meaning of code and name is this any variable or what *

oUserTable.Name = "1"// how we can define this plz give explanation with example.

oUserTable.UserFields.Fields.Item("COST_1").Value = "1" // *here we have to give item *

oUserTable.UserFields.Fields.Item("COST_2").Value = "200" /uniqueid..?

oUserTable.UserFields.Fields.Item("COST_3").Value = "300"

oUserTable.Add()

End If

End Sub