cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading data into User defined tables of SAP Business One

Former Member
0 Kudos

Hi,

Is it possible to programmatically (using DIAPI) populate a User Defined Table ?

Or since it is a User Defined Table, is it "legal" as far as SAP is concerned to populate it using SQL update/insert statements?

Any help on this os greatly apprecated.

Thanks in advance,

Sudha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you`ll have to use direct insert or update sql statement.

Petr

Former Member
0 Kudos

Hi ,

Try this code,

Dim ouserTable As SAPbobsCOM.UserTable

ouserTable = objSBOAPI.oCompany.UserTables.Item("Userdefined table name")

ouserTable.Code = "Get the Max(code) of the UDT plus one"

ouserTable.Name = "Get the Max(code) of the UDT plus one"

ouserTable.UserFields.Fields.Item("User deifned Field's Name(U_Cardcode) Case sensitive").Value = "The Value"

'Adding new Value

If ouserTable.Add() <> 0 Then

MsgBox(oCompany.GetLastErrorDescription)

End If

,Updating the existing record

If ouserTable.Update() <> 0 Then

MsgBox(oCompany.GetLastErrorDescription)

End If

Regards,

Tom.

Edited by: Tom C on Mar 19, 2008 10:47 AM

Answers (0)