cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading data into user tables

Former Member
0 Kudos

Hi,

I want to upload data into existing user tables using DIAPI.

Can somebody please let me know how to do this?

I know that user tables can be created using UserTablesMD object. I want to know how to upload data into user table of Document type. Any help on this is highly appreciated.

Thank you in advance,

Sudha

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sudha,

This functionality is not possible. Vishnu is explaining how to get data into a user table that's got "No Object" assigned to it, not a "Document Type" object.

It is planned for a future release and it's one of the biggest shortcomings of the SDK. Let's hold thumbs and hope it's soon!

Hope it helps,

Adele

Former Member
0 Kudos

Hi Adele and Vishnu,

Thank you for your quick help. I checked that we cannot add the user table of document type as of now. So we are kind of stuck at this point. But I am just wondering if we can do a sql export for this. Will it disturb the integrity between the tables?

Please advice.

Best regards,

Sudha

Former Member
0 Kudos

Hi Sudha,

you can use sql to insert the data but to maitain data integrity, while inserting the data in header and detail tables use starttransaction and end transaction of company object.

Regards

Vishnu

Former Member
0 Kudos

Hi

Dim oUserTable As SAPbobsCOM.UserTable

oUserTable = oCompany.UserTables.Item("URTABLENAME")

oUserTable.DocEntry = 15 OR for no object type oUserTable.code=15

oUserTable.DocNum = "15" OR for no object type oUserTable.Name="15"

oUserTable.UserFields.Fields.Item("U_Col1").Value = 5

oUserTable.UserFields.Fields.Item("U_Col2").Value = 2

oUserTable.UserFields.Fields.Item("U_Col3").Value = "Y"

oUserTable.UserFields.Fields.Item("U_Col4").Value = "C50003"

oUserTable.Add()

Hope it helps you

Regards

Vishnu

Former Member
0 Kudos

Hi

Dim oUserTable As SAPbobsCOM.UserTable

oUserTable = oCompany.UserTables.Item("URTABLENAME")

oUserTable.DocEntry = 15 OR for no object type oUserTable.code=15

oUserTable.DocNum = "15" OR for no object type oUserTable.Name="15"

oUserTable.UserFields.Fields.Item("U_Col1").Value = 5

oUserTable.UserFields.Fields.Item("U_Col2").Value = 2

oUserTable.UserFields.Fields.Item("U_Col3").Value = "Y"

oUserTable.UserFields.Fields.Item("U_Col4").Value = "C50003"

oUserTable.Add()

Hope it helps you

Regards

Vishnu