cancel
Showing results for 
Search instead for 
Did you mean: 

NCO 3.0 Binding an IRfcTable to a datagrid

Former Member
0 Kudos

Hi Folks,

Im new to SAP and have started playing with .Net Connector 3.0.

Ive successfully written an application (VB 2010) that connects to SAP , passes data to a custom BAPI and reads the table that is returned.

My question is how do you bind the returned IRfcTable to a datagrid ? (in VB)

At the moment I manually create a datatable and read the IRfcTable line by line adding newrows into the datatable.

Thanks

Kevin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Ah ha !

Found it 🐵

Dim view As IRfcTableView = TryCast(GetBatchTable.GetTable("OUTTAB"), ISupportTableView).DefaultView

            DataGridView1.DataSource = view

Former Member
0 Kudos

Could you please tell me how to do in C#.NET?

Former Member
0 Kudos

I dont use c# but try

IRfcTableView view = (GetBatchTable.GetTable("OUTTAB") as ISupportTableView).DefaultView;

DataGridView1.DataSource = view;