cancel
Showing results for 
Search instead for 
Did you mean: 

NCO 2.0 in VS 2005 : Data binding of return SAPtable to GridView

Former Member
0 Kudos

Hi,

I'm new to NCO and .Net. I followed the example to try the RFC 'RFC_GET_CUSTOMER' in VS2003. With the SAP proxy controls under toolbox, I found data binding was easy.

Then I tried to do the same example in VS2005 after porting the proxies in VS2003 to VS2005 (ie. the workaround solution)

In VS2005, there is no SAP tools available and it seem that we need to do a lot of coding, am I right?

In my VS2005 project, I can make a connect to SAP and get the customer records back. But I dont know how to bind the data to the Gridview on Webpage?

Below is my code, do I need to do a loop to populate the result from custTable to

the GridView?

===============================================

Dim custTable As BRFCKNA1Table = New BRFCKNA1Table

myProxy.Rfc_Customer_Get("", Me.TextBox1.Text, custTable)

GridView1.DataBind()

================================================

Would anyone please help?

Regards, Kathy

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kathy,

SAP does not support a connector for VS2005. But, you can create a dll in .net 2003 using .net connector and then you can use this dll in VS2005. You can find how to create dll is here : https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/92333e6b-0b01-0010-9cbf-fec...

Best Regards,

Huseyin Akturk

SW Engineer & ABAP Consultant

www.huseyinakturk.net

Former Member
0 Kudos

Hi Hyseyin,

I'd generated the dll and add to my VS2005 project. I can call the RFC in VS2005 and get a result set from the customer but I dont know how to present the result in webpage.

I have defined a gridview on the page and dont know how to bind the data.

Any idea?

Regards, Kathy

Former Member
0 Kudos

Hi Katky,

it is very easy. You have an sap result set/table that returns from rfc, say this set as sapSet. You need to;


myGridView.DataSource = sapSet.ToAdoDataTable();
myGridView.DataBind();

Note : If helpful, please don't forget reward points

Best Regards,

Huseyin Akturk

SW Engineer & ABAP Consultant

www.huseyinakturk.net

Former Member
0 Kudos

Thanks Huseyin.

But there seems problem in my result set or dll and I'm working on it.

Kathy