Consuming IDOCs from SAP using BizTalk Server – Part 2

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.

AdapterReference

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.

ConfigureButton

  • 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.

Transport

  • If youĀ scroll down, there areĀ few additional properties that are not included in Send Port configurations:
    1. Gateway Hostā€”Depending upon the configuration of your SAP system, this may be the same value as the Application Server Host.
    2. Gateway Serviceā€”This value generally begins with “sapgw” followed by the System Number.
    3. 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.

Transport

  • In the Other tab you need to provide the credential for the authentication. other

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.

ConfigureButton

  • 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

Transport

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>

 

category

  • In the Binding tab:
      1. EnableBizTalkCompatibilityModeā€”This value should always be set to True when calling SAP operations from BizTalk.
      2. 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.

sapBinding

  • On the Credentials tab, we need to provide our SAP credentials. In this scenario, we are using Username/Password credentials.

sapCredential

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/

Loved this? Spread the word


BizTalk Server Monitoring

Gautam

Follow me here

About the Author

My name is Gyanendra Kumar Gautam. I am Solution Consultant, who basically works to hook the stuff together using Microsoft technologies like Azure PaaS, Azure Serverless Services, Microsoft BizTalk Server, and Azure DevOps Services.

You may also like

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  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

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
turbo360

Never miss a good story!

 Subscribe to my blog to keep up with the latest news!