SAP .NET Connector NCo2.0 and NCo3.0
This Article explains how to upgrade NCo2.0 to NCo3.0. After reading this you should be able to differentiate between NCo2.0 and NCo3.0. In particular you will get to know about NCo 3.0:
1. Is more stable, robust and more secure.
2. Enforces a better design of your application by decoupling the connection handling from the .NET application.
3. Reduces memory consumption
4. Allows dynamic programming without the need for proxy generation
Microsoft has ended its support for VS 2003 and Window XP this year. SAP .NET connector 2.0 will not be available after 2014 onwards. Microsoft has introduced SAP .NET Connector 3.0 in the market. But both connectors behaves in different ways. with this article I am trying to explain about SAP .NET Connector 3.0 and how it is different from SAP .NET Connector 2.0
What's new in Nco 3.0?
1.NCo 3.0 no longer consists of a design time and a run-time.
2.There is no longer a dependency to a specific Microsoft Visual Studio version
It no longer uses the "proxy approach", but a "dynamic approach" similar to JCo and the NW RFC library. This makes it easier to develop applications using different versions of Microsoft Visual Studio.
3.NCo 3.0 supports the following platforms with new features as:
Windows XP, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2,Windows 7.
32bit (x86) as well as 64bit (x64) platforms.
Microsoft .NET Framework 2.0, 3.0, 3.5 and 4.0 (Choose the version for .NET 4.0, when using the .NET runtime 4.0, and the version for .NET 2.0, when using the .NET runtimes 2.0, 3.0,or 3.5.)
Methods for handling SAP connection information(Idestination configuration).
Improve client and server security handling.
Improved function invocation for both RFC clients and RFC servers.
Streamlined data access via Get/Set methods.
SAP communication is handled completely by managed code
No dependency on Librfc32.dll.
No Marshalling between managed and unmanaged code.
Features missing in Nco 3.0
No proxy generation
NCo 3.0 is able to call and receive function calls dynamically without any design time redevelopment or recompilation.
There would be a loss of strongly typed and tightly bound SAP data objects
Intelligence on SAP data types
SAP SOAP Server connectivity.
RFC Client- from Nco 2.0 to Nco 3.0
Proxy object replacement
Connection to SAP Host
Reference to SAP Functions
Set up Parameters
Invoke RFC
Get results
RFC Client- Proxy Object replacement
Connection to SAP host
Move connection from NCo 2.0 control to app.config (any other repository)
Reference to SAP Functions.
Use RfcDestination Manager to get RfcDestination Object
RfcDestination destination = RfcDestinationManager.GetDestination(parameters);
RFC Client- Proxy Object replacement Reference to SAP Functions
In NCo 2.0, SAP Function call were carried out via NCo Proxy WSDL
Proxy downloaded function metadata at design time
NCo 3.0 uses Rfcrepoistory class to retrieve function data at runtime
Class IRfcFunction replaces proxy objects for RFC client function calls
RfcRepository SapRfcRepository = destination.Repository;
IRfcFunction BapiGetCreditHostory = SapRfcRepository.CreateFunction("Z_AA_XXX_XXX_XXXX");
RFC Client- Setup Paramters
In NCo 2.0, data is assigned to instances of proxy objects
In SAP NCo 3.0 we use the SetValue method of an Irfcfunction object or its related IRfcStrucure,IRfcTable, or IrfcAbapObject objects before making the RFC call
RFC Client- invoke RFC
In NCo 2.0, proxy objects are passed as parameters, by position at the time of the function call:
In SAP NCo 3.0 we use the SetValue method of an Irfcfunction object or its related IRfcStrucure,IRfcTable, or IrfcAbapObject objects prior to making the RFC call
Once all data has been assigned to the Irfcfunction object, use the Invoke () method to execute the function
RFC Client- final results
In NCo 2.0, results are passed positionally via out parameters at the time of function call
The data is stored and must be accessed via the proxy objects
In SAP NCo 3.0 strongly typed GetXxxx methods are used to get data from Irfcfunction or associated IRfcStrcuture, IRcTable , IRfcAbapObjects.
Developer should know the structure of the SAP Data for proper data access of all object
Many object implement IEnumerable, so it is possible to iterate through the data
I hope you guys like this article. kindly post me your queries related to SAP .NET Connector 2.0 and 3.0. Any code related issues, I am happy to help you..
Anyone wants code on this. please send me request at smilykush@gmail.com
Regards
Kush Sharma