cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing the BAPI Control in C#

Former Member
0 Kudos

Can someone provide some code snippets or otherwise direction on how to access the BAPI Control in C#? I've done this in VBA many times. However am struggling with the syntax in C#.

Do I need the .NET Connector? Isn't that product at end-of-life? It doesnt work with VS 2008 does it?

Basically what I need to know is how to:

1) Instantiate the control

2) Make a connection and Login to SAP

3) Call a BAPI

T

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Wardell,

Yes, it is end-of-life in the sense that SAP will not continue it. However, the technology still works, so if it's sufficient for your situation, and in case it's not a problem for you that it will not be extended, it might do a satisfactory job.

SAP has only delivered a version which depends on .NET 1.1, and integrates within VS2003. But there is a by SAP documented approach to use it from later .NET frameworks versions: [Using SAP Connector for MS .NET (NCO) in Microsoft Visual Studio 2005|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/92333e6b-0b01-0010-9cbf-fecd62d6c895]

For a code example in C# of the NCo usage: [A Complete Sample : Connection to SAP from Visual Studio .NET 2003 via RFC|http://www.huseyinakturk.net/2008/12/a-complete-sample-connection-to-sap-from-visual-studio-net-2003-via-rfc/]

Also the following blog may be helpfull: [Connecting .Net Application to SAP server using SAP.Net Connector 2.0|http://sharesap.blogspot.com/2008/04/connecting-net-application-to-sap.html]

Best regards, William.

Answers (0)