Skip to Content
avatar image
Former Member

Creating database views via DI/UI API

Is it possible to add a database view via the DI or UI API?

I have a form for "set up" that I'm using to create UDF's, UDT's, and hopefully some views. I already have the SQL needed to create the views, but I can't figure out how to work it into my program.

I found in the UI API that there's an "Execute SQL" method, but it appears to be for filling in a data grid on a window--not for adding views to the system.

I am using C#.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 27, 2017 at 03:47 PM

    I believe you can use Recordset object

    Recordset rs = (Recordset)company.GetBusinessObject(BoRecordset);

    rs.DoQuery("YOUR QUERY HERE")

    Not sure if it is allowed by SAP.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Danilo Kasparian

      Thanks. I figured it out.(needed to reference SAPbobsCOM more explicitly)

      Unfortunately, it doesn't work, as the documentation implies.

      Looks like I'll just need to add the views manually.