Professional Documents
Culture Documents
Sap Biztalk Integration
Sap Biztalk Integration
In the past few years, the whole perspective of doing business has been moved towards
implementing Enterprise Resource Planning Systems for the key areas like marketing,
sales and manufacturing operations. Today most of the large organizations which deal
with all major world markets, heavily rely on such key areas.
Operational Systems of any organization can be achieved from its worldwide network of
marketing teams as well as from manufacturing and distribution techniques. In order to
provide customers with realistic information, each of these systems need to be
integrated as part of the larger enterprise. This ultimately results into efficient
enterprise overall, providing more reliable information and better customer service. This
paper addresses the integration of Biztalk Server and Enterprise Resource Planning
System and the need for their integration and their role in the current E-Business
scenario.
PURPOSE
There are several key business drivers like customers and partners that need to
communicate on different fronts for successful business relationship. To achieve this
communication, various systems need to get integrated that lead to evaluate and
develop B2B Integration Capability and EBusiness strategy. This improves the quality of
business information at its disposalto improve delivery times, costs, and offer
customers a higher level of overall service.
To provide B2B capabilities, there is a need to give access to the business application
data, providing partners with the ability to execute global business transactions. Facing
internal integration and businesstobusiness (B2B) challenges on a global scale,
organization needs to look for required solution. To integrate the worldwide marketing,
manufacturing and distribution facilities based on core ERP with variety of information
systems, organization needs to come up with strategic deployment of integration
technology products and integration service capabilities.
Business Scenario
Now take the example of this ABC Manufacturing Company: whose success is the
strength of its European-wide trading relationships. Company recognizes the need to
strengthen these relationships by processing orders faster and more efficiently than
ever before. The company needed a new platform that could integrate orders from
several countries, accepting payments in multiple currencies and translating
measurements according to each country's standards. Now, the bottom line for ABC's estrategy was to accelerate order processing. To achieve this: the basic necessity was to
eliminate the multiple collections of data and the use of invalid data. By using less
paper, ABC would cut processing costs and speed up the information flow. Keeping this
long term goal in mind, ABC Manufacturing Company can now think of integrating its
four key countries into a new business-to-business (B2B) platform.
Here is another example of this XYZ Marketing Company. Users visit on this company's
website to explore a variety of products for its thousands of customers all over the
world. Now this company always understood that they could offer greater benefits to
customers if they could more efficiently integrate their customers' back-end systems.
With such integration, customers could enjoy the advantages of highly efficient ecommerce sites, where a visitor on the Web could place an order that would flow
smoothly from the website to the customer's order entry system. Some of those backend order entry systems are built on the latest, most sophisticated enterprise resource
planning (ERP) system on the market, while others are built on legacy systems that
have never been upgraded. Different customers requires information formatted in
different ways, but XYZ has no elegant way to transform the information coming out of
website to meet customer needs. With the traditional approach: For each new ecommerce customer on the site, XYZ's staff needs to work for significant amounts of
time creating a transformation application that would facilitate the exchange of
information. But with better approach: XYZ needs a robust messaging solution that
would provide the flexibility and agility to meet a range of customer needs quickly and
effectively. Now again XYZ can think of integrating Customer Backend Systems with the
help of business-to-business (B2B) platform.
Environment
Many large scale organizations maintain a centralized SAP environment as its core
enterprise resource planning (ERP) system. The SAP system is used for the
management and processing of all global business processes and practices. B2B
integration mainly relies on the asynchronous messaging, Electronic Data Interchange
(EDI) and XML document transformation mechanisms to facilitate the transformation
and exchange of information between any ERP System and other applications including
legacy systems.
For business document routing, transformation, and tracking, existing SAP-XML/EDI
technology road map needs XML service engine. This will allow development of complex
set of mappings from and to SAP to meet internal and external XML/EDI technology and
business strategy. Microsoft BizTalk Server is the best choice to handle the data
interchange and mapping requirements. BizTalk Server has the most comprehensive
development and management support among business-to-business platforms.
Microsoft BizTalk Server and BizTalk XML Framework version 2.0 with Simple Object
Access Protocol (SOAP) version 1.1 provide precisely the kind of messaging solution that
is needed to facilitate integration with cost effective manner.
Document Flow
Friends, now let's look at the actual flow of document from Source System to Customer
Target System using BizTalk Server. When a document is created, it is sent to a TCP/IPbased Application Linking and Enabling (ALE) porta BizTalk-based receive function that
is used for XML conversion. Then the document passes the XML to a processing script
(VBScript) that is running as a BizTalk Application Integration Component (AIC). The
following figure shows how BizTalk Server acts as a hub between applications that
reside in two different organizations:
The data is serialized to the customer/vendor XML format using the Extensible
Stylesheet Language Transformations (XSLT) generated from the BizTalk Mapper using a
BizTalk channel. The XML document is sent using synchronous Hypertext Transfer
Protocol Secure (HTTPS) or another requested transport protocol such as the Simple Mail
Transfer Protocol (SMTP), as specified by the customer.
The following figure shows steps for XML document transformation:
The total serialized XML result is passed back to the processing script that is running as
a BizTalk AIC. An XML "receipt" document then is created and submitted to another
BizTalk channel that serializes the XML status document into a SAP IDOC status
message. Finally, a Remote Function Call (RFC) is triggered to the SAP instance/client
using a compiled C++/VB program to update the SAP IDOC status record. A complete
loop of document reconciliation is achieved. If the status is not successful, an e-mail
message is created and sent to one of the Support Teams that own the customer/vendor
business XML/EDI transactions so that the conflict can be resolved. All of this happens
instantaneously in a completely event-driven infrastructure between SAP and BizTalk.
Integration Steps
Let's talk about a very popular Order Entry and tracking scenario while discussing
integration hereafter. The following sections describe the high-level steps required to
transmit order information from Order Processing pipeline Component into the SAP/R3
application, and to receive order status update information from the SAP/R3 application.
The integration of AFS purchase order reception with SAP is achieved using the BizTalk
Adapter for SAP (BTS-SAP). The IDOC handler is used by the BizTalk Adapter to provide
the transactional support for bridging tRFC (Transactional Remote Function Calls) to
MSMQ DTC (Distributed Transaction Coordinator). The IDOC handler is a COM object that
processes IDOC documents sent from SAP through the Com4ABAP service, and ensures
their successful arrival at the appropriate MSMQ destination. The handler supports the
methods defined by the SAP tRFC protocol. When integrating purchase order reception
with the SAP/R3 application, BizTalk Server (BTS) provides the transformation and
messaging functionality, and the BizTalk Adapter for SAP provides the transport and
routing functionality.
The following two sequential steps indicate how the whole integration takes place:
A] Make an XML-formatted copy of the OrderForm object that is passing through the
order processing pipeline. The GenerateXMLForDictionaryUsingSchema method of
the DictionaryXMLTransformsobject is used to create the copy.
Collapse | Copy Code
B] Send the newly created XML order document to the MSMQ queue defined for this
purpose.
Collapse | Copy Code
Option Explicit
' MSMQ constants.
' Access modes.
Const MQ_RECEIVE_ACCESS = 1
Const MQ_SEND_ACCESS = 2
Const MQ_PEEK_ACCESS = 32
' Sharing modes. Const MQ_DENY_NONE = 0
Const MQ_DENY_RECEIVE_SHARE = 1
Resume Next
End Function
2.
A BTS MSMQ receive function picks up the document from the MSMQ queue and
sends it to a BTS channel that has been configured for this purpose. Receiving the XML
order from MSMQ: The second step in sending order data to the SAP/R3 application
involves BTS receiving the order data from the MSMQ queue into which it was placed at
the end of the first step. You must configure a BTS MSMQ receive function to monitor
the MSMQ queue to which the XML order was sent in the previous step. This receive
function forwards the XML message to the configured BTS channel for transformation.
3.
The third step in sending order data to the SAP/R3 application involves BTS
transforming the order data from Commerce Server Order XML v1.0 format into
ORDERS01 IDOC format. A BTS channel must be configured to perform this
transformation. After the transformation is complete, the BTS channel sends the
resulting ORDERS01 IDOC message to the corresponding BTS messaging port. The BTS
messaging port is configured to send the transformed message to an MSMQ queue
called the 840 Queue. Once the message is placed in this queue, the BizTalk Adapter for
SAP is responsible for further processing.
4.
BizTalk Adapter for SAP sends the ORDERS01document to the DCOM Connector
(Get more information on DCOM Connector from www.sap.com/bapi), which writes the
order to the SAP/R3 application. The DCOM Connector is an SAP software product that
provides a mechanism to send data to, and receive data from, an SAP system. When an
IDOC message is placed in the 840 Queue, the DOM Connector retrieves the message
and sends it to SAP for processing. Although this processing is in the domain of the
BizTalk Adapter for SAP, the steps involved are reviewed here as background
information:
o
Determine the version of the IDOC schema in use and generate a BizTalk
Server document specification.
o
Create a routing key from the contents of the Control Record of the IDOC
schema.
o
Request a SAP Destination from the Manager Data Store given the
constructed routing key.
o
Submit the IDOC message to the SAP System using the DCOM Connector
4.6D Submit functionality.
2.
The BTS message port posts the transformed order update document to the configured
ASP page for further processing. The configured ASP page retrieves the message posted
to it and uses the Commerce Server OrderGroupManager and OrderGroup objects to
update the order status information in the Commerce Server orders database.
4.
by adding the page _OrderStatusUpdate.aspto the AFS Solution Site and configuring the
BTS messaging port to post the transformed XML document to that page. The update is
performed using the Commerce Server OrderGroupManager and OrderGroup objects.
The routine ProcessOrderStatus is the primary routine in the page. It uses the DOM and
XPath to extract enough information to find the appropriate order using
the OrderGroupManager object. Once the correct order is located, it is loaded into
an OrderGroup object so that any of the entries in the OrderGroup object can be
updated as needed.
The following code implements page _OrderStatusUpdate.asp:
Collapse | Copy Code
oOrderGroupMgr
oOrderGroup
rs
sPONum
oAttr
vResult
vTracking
oXML
dictConfig
oElement
PostedDocument
ContentType
CharSet
EntityBody
Stream
StartPos
EndPos
.NET Support
This Multi-Tier Application Environment can be implemented successfully with the help
of Web portal which utilizes the Microsoft .NET Enterprise Server model. The Microsoft
BizTalk Server Toolkit for Microsoft .NET provides the ability to leverage the power of
XML Web services and Visual Studio .NET to build dynamic, transaction-based, faulttolerant systems with full access to existing applications.