In the last post I covered the basic overview of IDOCs, its flow path and IDOC schema generation in BizTalk. In this post I will go through the port configuration for receiving and sending IDOCs inĀ BizTalk. We can can useĀ either of WCF-SAP Adapter or WCF Custom Adapter with SAP bindings. It does not matter whether you use the WCF-Custom Adapter or WCF-SAP Adapter, you are not losing any functionality. Using the WCF-SAP adapter does simplifies the administration tasks that are involved in maintaining the BizTalk environment.
INBOUND – Receiving IDOCs from SAP
First thing you need toĀ add a reference to the Microsoft.Adapters.SAP.BiztalkPropertySchema.dll.Ā This is required when you have a BizTalk application deployed which includesĀ any IDOC schemas.
If you fail to add this reference, you might get the following runtime error in the event viewer when trying to process an SAP IDOC:
“System.Exception: Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly.”
Now that we have the reference in place, we are going to configure the WCF-SAP Adapter, with BizTalkServerApplication Receive handler and Ā XMLReceive Receive Pipeline.
- Click the Configure button so that youĀ can provide the SAP connection information.
- Once in the WCF-SAP Transport Properties dialog, Ā click the Configure button to provide the SAP connection information.
- Now youĀ need to provide the Application Server Host, System Number, and Client.
- If youĀ scroll down, there areĀ few additional properties that are not included in Send Port configurations:
- Gateway HostāDepending upon the configuration of your SAP system, this may be the same value as the Application Server Host.
- Gateway ServiceāThis value generally begins with “sapgw” followed by the System Number.
- Program IdāThis may also be referred asĀ Partner Profile and acts as an authorization container for SAP IDOC interfaces. Ā This detial will be provided to you by Ā BASIS admin. Within thisĀ Ā BIZTALK, theĀ Program ID configuration in SAP, entries will exist for IDOC that will be received by BizTalk. Also BizTalk user will haveĀ access to send or receive these types of IDOCs.
With this now our Receive Port is configured to receive the IDOCs from SAP.
OUTBOUND – Sending IDOCs to SAP
- Create a one way Send Port and click on the Configure button to edit the SAP-specific properties.
- Click the Configure button again to edit the SAP URI. Much like our IDOC configuration for receiving the IDOC, we want to populate the following values:
- Application Server Host
- System Number
- Client
Click the OK button to close this dialog
- Ā SOAP Action Header’s ActionĀ – provide the operation name and Action value
<BtsActionMapping xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<Operation Name=”Orders05″ Action=”http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05/ZORDERS05/740/Send” />
</BtsActionMapping>
- In the Binding tab:
- EnableBizTalkCompatibilityModeāThis value should always be set to True when calling SAP operations from BizTalk.
- EnableSafeTypingāSince not all .NET and SAP types are created equally, we occasionally need to set the value true forĀ this propertyĀ to handle some constraints around dates. For example, refer this. By default this value is false.
- On the Credentials tab, we need to provide our SAP credentials. In this scenario, we are using Username/Password credentials.
In order to start the application, we must bind our orchestration to the Physical Receive and Send ports that you have created.
In next post I will discuss about custom IDOCs and RFCs / BAPIs.
Resource:
Microsoft BizTalk 2010: Line of Business Systems Integration
http://www.integrationusergroup.com/hybrid-integration-with-sap/
Related links:
https://gautambiztalkblog.com/2016/01/11/consuming-idocs-from-sap-using-biztalk-serverpart-1/
I need to send few order IDs and receive purchase orders from SAP R3 4.6 for only those order IDs.
More over I just need few basic info as response from SAP may be just 3-4 fields of data for each order ID. How should I achieve that? Thanks