Connecting to SAP System in Visual Studio Using Add Adapter Service Reference Plug-in
To connect to an SAP system using the SAP adapter in a .NET programming solution, you must use the Add Adapter Service Reference Visual Studio Plug-in. This topic provides instructions on how to use the Add Adapter Service Reference Plug-in.
Perform the following steps to connect to an SAP system using the Add Adapter Service Reference Plug-in.
-
To connect using the Add Adapter Service Reference Plug-in in a BizTalk solution:
- Create a project in Visual Studio.
- Right-click the project in Solution Explorer, and then click Add Adapter Service Reference. The Add Adapter Service Reference Plug-in opens.
- Create a project in Visual Studio.
-
From the Select a binding drop-down list, select sapBinding and click Configure.
-
In the Configure Adapter dialog box, click the Security tab, and from the Client credential type drop-down list box, select Username and specify the user name and password to connect to the SAP system.
Important If you are using the SAP Secure Network Connection (SNC) library to connect to an SAP system, do not specify a username and password. -
Click the URI Properties tab and specify values for the connection parameters. For more information about the connection URI for the SAP adapter, see The SAP System Connection URI.
Important If you are using the SAP SNC library to connect to an SAP system, set the UseSnc connection property to True.
Note If the connection parameters contain any reserved characters, you must specify them as-is in the URI Properties tab, that is, without using any escape characters. However, if you specify the URI directly in the Configure a URI field and the connection parameters contain reserved characters, you must specify the connection parameters using proper escape characters. -
Click the Binding Properties tab, and then specify values for the binding properties, if any, required by the operations you want to target. For example, if you want to target a ReceiveIdoc operation you must set the ReceiveIdocFormat binding property to String. For more information about binding properties, see Working with BizTalk Adapter for mySAP Business Suite Binding Properties.
Important If you are using the SAP SNC library to connect to an SAP system, set the SncLibrary and SncPartnerName to appropriate values. The SncLibrary binding property takes the path and the filename of the DLLs required for using SNC to connect to an SAP system. These DLLs must be present on the computer with the SAP client and SAP adapter installed. For more information see the BizTalk Adapter Pack installation guide available at <installation guide>:\Program Files\Microsoft BizTalk Adapter Pack\Documents. The SncPartnerName binding property takes the SNC name of the communication partner. -
Click OK.
-
Click Connect. After the connection is established, the connection status is shown as Connected.
The following figure shows the Consume Adapter Service Add-in immediately after the connection is established. The graphical user interface is same for the Add Adapter Service Reference Plug-in.

The Add Adapter Service Reference Plug-in displays different nodes containing various artifacts that can be invoked in an SAP system. For example, the RFC node contains all the RFCs available in the SAP system you connected to. For more information about these nodes, see Metadata Node IDs.