Skip to Content

Creating database views via DI/UI API

Jun 27, 2017 at 03:44 PM


avatar image
Former Member

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#.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Danilo Kasparian Jun 27, 2017 at 03:47 PM

I believe you can use Recordset object

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


Not sure if it is allowed by SAP.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I can't find the RecordSet class. (When I paste your code, it tells me "The type or namespace 'Recordset' could not be found")


You probably didn`t add the SAPBobsCom reference.

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.