SAP is announcing a new version of SAP Connector for Microsoft .NET 3.0 (now called “NCo 3.0″). A beta program for selected customers and partners is currently underway (Q3, 2010) with the general release of the software coming soon thereafter. I will highlight some of the major differences between the SAP Connector for Microsoft .NET 2.0 and NCo 3.0 (besides the obvious, and much-needed name-shortening).
EDITOR’S NOTE: NCo 3.0 has now been released. Read more details here.
NCo 3.0 Logon
- The unauthorized reading of sensitive logon data from the .NET configuration file (e.g. app.config).
- The potential to create a malevolent application which replaces the customized logon data with it’s own logon data to obtain backend user sessions with different authorizations.
- The potential to create a malevolent application which gains access to an open connection that was originally intended for a different application.
One of the new features implemented to combat the malevolent for RFC client attacks is the interface IDestinationConfiguration. This interface contains method IDestinationConfiguration.GetParameters(string destinationName) which allows .NET programmers to provide their own secure method for storing and retrieving logon information, be it encrypted database, encrypted file, or even LDAP. There is also a corresponding interface and method to secure NCo 3.0 RFC servers.
Additionally, there is updated functionality to support single sign-on (SSO) and X.509 certificates.
Say Goodbye to Data Containers and Generated Code
In SAP Connector 2.0, working with RFCs required the generation of proxy code via the SAP .NET Connector design-time tool. This tool would convert the IMPORTING, EXPORTING, CHANGING, and TABLES parameters from the RFC you were calling/serving to .NET representations of the same. With NCo 3.0 there is no longer any kind of generated code. Instead of one generated proxy method for each function module, there is one single RfcFunction class, whose Invoke() method dynamically executes every given ABAP function module. Additionally, all ABAP parameters will be represented by the class RfcStructure instead of a dedicated generated class for every structure; All tables will be represented by class RfcTable. So, instead of hard-coding all of the data and variable bindings statically at design time, NCo 3.0 now handles everything dynamically at runtime.
NCo 3.0 uses SAP’s data dictionary to determine the function interface for the called RFCs. While this data is cached locally for performance reasons, NCo 3.0 is robust enough to detect changes in RFC interface signatures so your code will still execute if you’ve added, deleted, or changed RFC parameters. If there arises a situation where the dynamic lookup of RFC interface signature is not wanted, there is also an option to hard code the RFC parameter metadata.
The biggest benefit of NCo 3.0′s new dynamic function handling is that NCo 3.0 no longer has a design-time component. This releases the Visual Studio version restriction that .NET 2.0 had. Let me rephrase that, NCo 3.0 will work with any version of Visual Studio you like! The only requirement is that at runtime, a .NET Framework version is installed that is compatible with the NCo 3.0 libraries.
Anxiously Waiting
NCo 3.0 figures to be a much-needed update to a vital SAP integration technology. I, for one, cannot wait for the new functionality to be generally released. Once NCo 3.0 is released we’ll be posting blogs highlighting the new features. We’ll also include helpful information regarding a .NET Connector 2.0 to NCo 3.0 upgrade. In the meantime, if you have any leave any questions or comments you have regarding NCo 3.0 below. You may also email me directly at csta...@dataxstream.com if you’d like to set up a detailed conversation.

Hi Craig
Thanks for the insight. The new features look promising. Do you if we will be able to use the conenctor with VS2008 or higher?
Thanks
Any further word on a release date?
NCo 3.0 has been released at the SAP Market Place.
This was officially released 12/22/2010. You can download from the connectors site
Hi Craig,
I’m using a new NCo 3.0 and I need to throw an exception in a server fuction; but doesn’t work could you send me an example?
This is my code:
[RfcServerFunction(Name = "XXXXXX")]
public static void XXXXXX(RfcServerContext context, IRfcFunction function)
{
Int32 oCount = MyServerDemo.server.Monitor.UsedConnectionCount;
IRfcTable sapTable = function.GetTable(“zfile”);
function.AbapClassExceptionMode = RfcAbapClassException.Mode.FULL;
RfcAbapException oExc = new RfcAbapException(function.Metadata.GetAbapException(1).Key);
throw oExc;
}
Craig,
Have you done any type of SSO with NCo? We love the new NCo capabilities, but really need to figure out SSO for our situation. We can’t find any specific SAP example documentation on how to do this?
We would like a user to invoke a SharePoint web part to review and approve SAP ECC invoices. The user has already logged into active directory on our network, and we would like to automatically log them into SAP and not prompt them for their SAP account and password. Their active directory and SAP accounts do match in this situation (even though passwords may not).
problem in NCO 3.0.3.0 convert time
Details
http://forums.sdn.sap.com/message.jspa?messageID=10830236#10830236
Hi Craig,
I need to input a tableto a RFC, but it doesn’t work, can you tell why? It is my code:
RfcRepository repo = prd.Repository;
IRfcFunction function = repo.CreateFunction(“ZMES1″);
IRfcTable ROFTable = function.GetTable(“Z_MESTAB”);
ROFTable.Insert();
ROFTable.CurrentRow.SetValue(“AUFNR”, “988888888888″);
ROFTable.CurrentRow.SetValue(“AUART”, “PP01″);
ROFTable.CurrentRow.SetValue(“ERNAM”, “hisen”);
function.SetValue(“Z_MESTAB”, ROFTable);
function.Invoke(prd);
the program did not report error, but i can’t get the result in SAP, it seems input a blank value to RFC.