Professional Documents
Culture Documents
Applies to:
SAP ECC 6.0 and Microsoft .NET 2003 (V 1.1.4322 and SP1).
Summary
This document will provide complete reference and guide for integrating Microsoft C# .NET 1.1/2.0 windows
application with SAP ERP. Integration is being done on SAP .NET connector. This communication is being
done through SAP proxy class in Microsoft .NET 1.1/2.0 and to generate the proxy class used wsdl file which
created from Java Jar file in the SAP .NET connector. As this communication is being done by SAP proxy
class in MS .NET 1.1/2.0 IDE. In the end using the proxy class invocation of RFC will be done and able to
make the transaction in SAP system. Most importantly in this entire integration process SAP .NET connector
wizard only used for create proxy class from the wsdl file and provide the uniformed approach for creating
the same. Its help the practitioner to over come the paint point they face while create the proxy connection,
invoking the call the SAP function module etc.
Author Bio
Charbak Chatterjee is working in IBM India as Application developer on architecture and
development of composite application using CAF Web Dynpro etc..He also working in
Microsoft Technologies like MS .NET 1.1,2.0 ,Visual Basic 6.0, SQL Server -2005 , Crystal
Report etc and have depth understanding on SOA, Webservices, XML and different
enterprise integration system
able of Contents
Introduction .........................................................................................................................................................3
Architecture Overview .....................................................................................................................................3
1. Identify the RFC in SAP system..................................................................................................................4
2. Create WSDL file for specific RFC..............................................................................................................4
2.1 Reason behind to create WSDL.............................................................................................................................4
2.2 Create WSDL file ...................................................................................................................................................4
3. Create SAP proxy class in Microsoft Visual C# .NET 1.1. environment.....................................................6
3.1 Create SAP proxy class .........................................................................................................................................6
4. Invoke the RFC enabled function module through proxy class ..................................................................8
4.1 Writing code in MS .NET 1.1 using the proxy class ...............................................................................................8
Related Content..................................................................................................................................................9
Disclaimer and Liability Notice..........................................................................................................................10
Introduction
Connecting SAP system through SAP .Net Connector is already defined process but to leverage the same
within existing enterprise landscape there was not good enough article till now. Specifically while creating the
client proxy in MS .NET application in order to invoke SAP RFC’s using correct credential , many time we are
not able to create the same. In this regards we need some generic steps by which we will able to create SAP
proxy classes in MS .NET IDE and able to execute several transaction in SAP system by RFC. To achieve
the goal approach as follows
• Identify the RFC in SAP system
• Create the WSDL file for a specific RFC.
• Create SAP proxy class from the WSDL in the MS .NET application
• Make transaction in SAP system through RFC by the SAP proxy class.
Architecture Overview
Below diagram reflecting the architecture overview of the system.
We are not
following this
path Microsoft .NET 1.1
Application
SAP
SAP .NET
System Connector
Create proxy class
Note: these message only shows the developer pain point for your reference.
To overcome this situation and make the entire integration process generic we need to create the WSDL file
for this function module and import the same in to the MS .NET application for creating the proxy class for
this function module.
In the dos prompt change to the installation directory where you install the SAP .NET connector for Visual
studio 2003.In this our case it will be “C:\Program Files\SAP\SAP .NET Connector for VisualStudio 2003” .If
you have install SAP .NET connector 2.0 it will be like this “C:\Program Files\SAP\SAP .NET Connector
2.0_1”.
Note: WSDL which is created from SAP .NET connector 2.0 can be used in both MS .NET 1.1 and MS .NET 2.0 version.
Then type the following command in the command prompt and press enter to create the WSDL file in your
desired location.
Command - "C:\Program Files\Java\jre1.5.0_14\bin\java.exe" -Xmx128m -cp
aii_upload_core.jar;aii_upload_sap.jar;aii_util_misc.jar;aii_util_xml.jar;aii_util_rb.jar
;inqmyxml.jar;sapjco.jar;SAPmdi.jar com.sap.aii.upload.tool.RFC2WSDLTool "C:\Documents
and Settings\Administrator\Desktop\SAPProxySll1\metadata.wsdl" <host IP> <id> <client>
"<user id>" "<password>" BAPI_BUPR_EMPLO_ADDRESSES_GET
Note: Please change the SAP system login credential in the above text which is marked by “< .. >”.
• Host IP
• System ID
• SAP client
• User id
• Password
Note : If you unable to generate the WSDL file please use SAP .NET Connector 2.0. Also assuming that Java runtime
was already installed and the path of the Java Runtime is "C:\Program
Files\Java\jre1.5.0_14\bin\java.exe".
Fig 1
After create the project select that in solution explorer and open the context menu and click on “Add new
item” Fig2
Fig 2
Then select the item named as “SAP Connector Class” , provide the appropriate name to the class and click
on open to proceed further (Fig3)
Fig3
After click on “open” it will ask from where it will generate from . Select the “WSDL file from SAP IFR” and
click on next (Fig 4).
Fig 4
In the next step select the WSDL file that we created earlier and then click on “next” to complete the
generation process of SAP proxy class. The SAP proxy class will be generated and we can start working
with that (Fig 5).SAP proxy class will be generated successfully in the MS .NET 1.1 aplication.
Fig 5
After executing the RFC return value will be populated into the tables AddressTbl and BapiretTbl and you
can do the further processing with those tables.
Related Content
Download SAP connector for Microsoft .NET 1.1/2.0
The SAP .Connector – Architecture and Functionality
SAP .NET connector programmer’s reference