This blog is going to discuss about how to integrate .NET Microsoft applications and SAP ECC using SAP PI, how they will implement code in .NET environment to send request to SAP PI.
We have diffeent options to integrate .NET applications and SAP Systems.
Using SAP .NET connector without using middleware’s .
The SAP .NET Connector is a development environment that enables communication between the Microsoft. NET platform and SAP systems. This connector supports RFCs and Web services, and allows you to write different applications such as Web form, Windows form, or console applications in the Microsoft Visual Studio.Net. With the SAP .NET Connector, you can use all common programming languages, such as Visual Basic. NET, C#, or Managed C++.
Refer below SAP help document to know more about the SAP .NET connector.
Using SAP NetWeaver Gateway,
Refer Below link to know more about SAP NetWeaver GateWay
Recently I had done integration of the .NET Microsoft application and SAP ECC 6.0 using SAP Net weaver Process Integration 7.1 EHP1.
Refer below blog to choose the Right Adapter to integrate with SAP systems; it gives clear picture how to integrate SAP Systems using SAP PI with different approaches.
How to send the request from .net Application to SAP PI.
PI development process is same as any normal interface, get wsdl/xsd for both request and response structures or define data types manually if the interface is synchronous, asynchronous case you don’t required response structures., then complete ESR part(message type,service interfaces ,message and Operation mappings).
Create SOAP sender communication channel and receiver side (RFC/Proxy/IDoc) then complete configuration in ID and test your development in PI point of view. After that publish your sender agreement in Service registry and provide WSDL URL to .NET application team.
Refer below my blog how to publish service in service registry and how to test interface using WS Navigator.
.Net Application team expects WSDL and Service URL from PI Team.
After publishing the sender agreement in service registry (SR) automatically WSDL URL will be generated share WSDL or you can share the WSDL file by selecting an option display WSDL in Sender agreement.
But the best approach is providing WSDL URL to .NET team because if any structural changes in request/response strcutures then just publishing the sender agreement in Service registry will automatically update with new structure and WSDL URL remains same ,.NET team have to refresh their environment once to view the new structure.
if you provide WSDL file manually then you have take WSDL file for new structure and have to send one more time (Via Mail),AFAIK it’s not a right approach.
.NET have WCF programming platform to send request to PI,WCF is the place where exactly coding will be done.
Windows Communication Foundation (WCF):
Windows Communication Foundation is a programming platform and runtime system for building, configuring and deploying network-distributed services, Interoperability is the fundamental characteristics of WCF. It is unified programming model provided in .Net Framework 3.0. WCF is a combined feature of Web Service, Remoting, MSMQ and COM+. WCF provides a common platform for all .NET communication.
After providing the WSDL and Service URL to .net team, first they will add WSDL in their WCF environment;
PS: Make sure that WSDL URL should be accessible in .NET environment.
Enter the PI credentials and click on the ok. If SAP WSDL find then it will display the following data, now WSDL structure will be available in WCF environment.
They will Name the service in “Namesapce” section. The Service will add under App_WebReferences section with given name in Namesapce.Then Go to Web.config page in ASP.Net Application and add end point address is nothing but service url.
Final step is writing code in coding section in the application, they will add code to access the SAP methods.
SAPServiceName.IXXXXX_OutClient objClient = new SAPServiceName.IXXXXX_OutClient();
objClient.ClientCredentials.UserName.UserName = “***UserName***”;
objClient.ClientCredentials.UserName.Password = “***Password***”;
1) In Sync scenarios if response message structure payload huge means sometimes .Net team may face time out expcetions, they have to change theIR configuration details in their environment to accept huge payload as a response.
2) PI point view make sure that SAP System returns response within expected time.