cancel
Showing results for 
Search instead for 
Did you mean: 

Creating database views via DI/UI API

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member233854
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

former_member233854
Active Contributor
0 Kudos

You probably didn`t add the SAPBobsCom reference.

Former Member
0 Kudos

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.

Answers (0)