Consuming IDOCs from SAP using BizTalk Server–Part 1

Building an IDOC integration solution need work and effort on both end SAP and BizTalk.

At SAP end the BASIS administrator need to create the BizTalk Account, Program ID, or Partner Profile, that will provide access to the various IDOCs which can be used by external application for processing. For further details you can refer the excellent post by Nino Crudele.

This post series mostly focus on what all need to be done at BizTalk end for processing IDOCs.

Why do any Organization choose BizTalk to integrate with SAP?

As mentioned by one of the BizTalk expert Kent Weare in his book, BizTalk often competes with PI when organizations start integrating SAP with other internal and external systems.

Organizations that choose to introduce BizTalk  over SAP PI usually do so for some of the following reasons

  • Scarcity of SAP PI resource
  • Microsoft has an excellent online free resources
      • In order to verify this, all one needs to do is start referring MSDN TechNet and BizTalk MSDN Forum as these are the best places where the experts in BizTalk community contribute and share their knowledge. The amount of BizTalk integration-related information is un-paralleled amongst BizTalk’s competitors.
  • Consistent Development tool – Visual Studio
      • Most of the BizTalk development task are done using Visual Studio. So both a BizTalk developer and a core .Net developer perform their development tasks in Visual Studio. Tasks like adding Service references and schema development are extremely similar between the two technologies.

        The development tools on the SAP platform do not possess the sophistication and continual improvement that Visual Studio provides.

  • Productivity
      • Refer the whitepapers which present the results of a study that compared Microsoft BizTalk Server  to SAP XI for integrating heterogeneous systems.

 

What are IDOCs?

IDOC stands for Intermediate Document and is a SAP specification that is used for data transfer

  • Between SAP systems
  • Between SAP and external systems
  • Can be inbound or outbound
  • Can be traditional flat-file structure or XML
  • Idocs support versioning and customization

IDOC Flow Paths (outbound form SAP)

image.png

IDOC Flow Paths (inbound to SAP)

image.png

 

IDOC schemas generation

To generate the IDOC schema in BizTalk following information would be required.

  • IDOC name
  • Username & password with privilege to access the IDOC
  • SAP Connection Information. Example – sap://CLIENT=100;LANG=EN;@a/sv-sap-dv1/00?GWHOST=sv-sap-dv1&GWSERV=sapgw00&ListenerProgramId=BIZTALKDEV&RfcSdkTrace=False&AbapDebug=False

Once you have the above details you can use Consumer Adapter Service (Add—Add Generated Items…Consume Adapter Service) to bring the configuration wizard

sapBinding

Use SAP Connection Information to configure the adapter service for SAP binding.

sapCredential

On we have configured the Wizard properly, we can now click the Connect button to establish a connection to SAP.

You need to select contract type depending on the operations you want to perform:

If you are sending an IDOC to SAP then you  need to specify a Client (Outbound operations).

outbound

If you are receiving an IDOC from SAP then you  need to specify a Client (Inbound operations).

inbound

Now you need to focus on is the Search in category function. First you need to Select a category  from the option available BAPI, IDOC, RFC, and TRFC . Here I have selected IDOC.

category

There can many different versions of the IDOC within the SAP systems. Select the version of the IDOC that you are interested in.

sapversion

The Consume Adapter Service Wizard allows us to generate a single IDOC schema or multiple IDOCs at the same time. When dealing with multiple schemas, we can check the Generate unique schema types check box. By doing so additional schemas will be generated with unique namespaces.

Once OK button is clicked, you will see all the schemas and binding info files inside Visual Studio project.

image.png

Once the schemas are generated we can use them to receive / send IDOC from SAP by configuring the ports in BizTalk. I will cover that in next post.

Resource:

Microsoft BizTalk 2010: Line of Business Systems Integration

Introduction to SAP Integration for .NET Developers

Related links

https://msdn.microsoft.com/en-us/library/dd788024.aspx

https://www.youtube.com/watch?v=j5UZgoS7xaM

Advertisements

One thought on “Consuming IDOCs from SAP using BizTalk Server–Part 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s