cancel
Showing results for 
Search instead for 
Did you mean: 

Insert data in UDT of type Document/Document_line

Former Member
0 Kudos

hi all

i am in great need to insert data in a UDT of type Document/Document_line through code. i have created a UDO of my tables and now want to insert data in these tables through code.

how to achieve this, plz do reply me as soon as possible

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

barend_morkel2
Active Contributor
0 Kudos

Dim userTable As SAPbobsCOM.UserTable

'Use the user table we added before

userTable = oCompany.UserTables.Item("YourTableName")

'Add a first row in the table

userTable.Code = "A1"

userTable.Name = "A.1"

userTable.UserFields.Fields.Item("U_Your1stField").Value = "First value"

userTable.UserFields.Fields.Item("U_Your2ndField").Value = "2nd Value"

userTable.Add()

'Second row in the @TB1300 table

userTable.Code = "A2"

userTable.Name = "A.2"

userTable.UserFields.Fields.Item("U_Your1stField").Value = "Second value"

userTable.Add()

userTable.UserFields.Fields.Item("U_Your2ndField").Value = "Row 2 UDF 2"

userTable = Nothing

Former Member
0 Kudos

thanks dear

but u have given solution for normal UDT's but i want to insert data in UDT of type Document/Document_line which do not have code and name fields in fact there are DocEntry and DocName columns.

Former Member
0 Kudos

i will ,ike to add one more thing that these UDT's are bounded with UDO and i want to add data from code.

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I think you are asking the same thing as the message

Please have a look at it.

Regards

Trinidad.

Answers (0)