SAP ERP CONNECTING WebSphere Adapters and IIB

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 34

Accessing SAP Enterprise Resource Systems

using WebSphere Adapters and Intergration


bus.
This article shows you how to configure, deploy, and test the WebSphere Adapter for SAP when
using Intergration Bus Node and the Intergration Bus Toolkit to connect to an SAP ERP system -
Using Adapters, you can quickly and easily deploy applications and integrate processes that
exchange information between CRM, ERP, HR, and supply chain systems, thereby delivering
extensive functionality and ease of use while reducing development costs, time-to-market, and
business risk.

Introduction
Application integration refers to solutions that connect various applications and data sources
within organizations. IBM® WebSphere® Adapters service-enable applications by connecting
them using WebSphere Message Broker within an SOA.

WebSphere Message Broker is an Enterprise Service Bus (ESB) solution that supports a wide
range of communication protocols and formats. It is used to implement an application integration
architecture, because it provides a mechanism to connect, route, and transform business data
from a variety of applications and sources, without the need to change the applications
generating the data. WebSphere Message Broker Toolkit is shipped with the product and is an
Eclipse-based plug-in based on IBM Rational Application Developer. The Toolkit helps you
develop message flows and message sets, and administer message brokers and their runtime
components, including execution groups and the deployed message flows that run within them.

Using WebSphere Message Broker with SAP systems

Using the WebSphere Adapter for SAP, an application component can send a request to the SAP
server or receive events from the SAP server:

Figure 1

The ALE interface provides an asynchronous interface for sending batch data represented by
IDocs to SAP applications. The Adapter extracts the IDoc information from the message, and
then uses SAP Java Connector Architecture (JCA) function calls to convert the message
representing the IDoc object to a table format compatible with the IDoc Format. The Adapter
then uses RFCs in the SAP RFC library to establish an RFC connection to the ALE interface,
pass the IDoc data to the SAP system, and then release the connection to SAP. Here is the
sequence of processing actions that result from the inbound request, using ALE interface:
The Adapter uses the event recovery mechanism to track and recover events in case of
unexpected interruption. The event recovery mechanism uses a data source to persist the event
state.

This article shows you how to use WebSphere Message Broker and the Message Broker Toolkit
to create a SAP module that uses the WebSphere Adapter for SAP to connect to an SAP ERP.
The article uses the ALE_REQ_INBOUND interface.

Prerequisites.

 Websphere MQ
 WebSphere Intergration Bus (IIB)
 WebSphere Message Broker Toolkit should be installed on the client machine the same
server as in this case.

Configuration steps
1. Using WebSphere MQ Explorer, create local queues in a queue manager on server.

2.
Receiving ALE REQ events from an SAP system using the
WebSphere Intergration Toolkit
1. Generate an artifact by configuring the SAP system and providing connection details and
type of operations. Click FILE > NEW.Choose Adapter Connection:

Figure 2

2. In the next window, select WebSphere Adapter for SAP with transaction support:

Figure 3
3. Click Next and add SAP JCO details by browsing the SAP JCO files provided by the
SAP system:

Figure 4
4. Click Next and select Inbound. In this step the client decides to receive events from the
SAP system.

Figure 5
5. Click Next and provide the SAP connection details. For the SAP Interface, select ALE:

Figure 6

6. Filter and select ALEREQ01 IDoc from the basic IDocs provided. Use ALEREQ01 IDoc
as an example:

Figure 7
Click Create or Edi

CLICK OK
Double Click ZPAY_IC, put in options
Click Ok
7. In the next window, select Create and then select the IDoc identifiers, which have been
configured for outbound processing from SAP. Specify that only events with the above
identifiers from zpay_idoc IDoc can be sent to the client.

Figure 9
8. Provide the RFC Program ID from the port client that will receive events from SAP:
9. Double Click Avanced and turn on Trace logs and paths

Figure 10
10. Select Application container to create and provide the Adapter component name:

Figure 11
11. Click OK, enter the Application Name, and then click Finish to complete the artifact
generation:

Figure 12

Configuring Intergration bus node to use the Intergration


Toolkit
1. From the Intergration Nodes view, connect to the intergration bus node installed on the
IIBus .
2. Click the button at extremely bottom left and it indicates Show view as fast view
3.
4.
5.
6. Click Application development
Figure 13

7. Verify that the broker is configured successfully and is up and running:


Figure 14

8. Add a message flow to the application container: Right-click on the application container,
select New => Message Flow, provide the message flow name, and then click Finish:

Figure 15
9. Drag Inbound Adapter model into the workspace to configure the message queues.
Wire the message queues to the model to understand the message flow and traverse from
result to endpoint:

Figure 16
If you can see diagram above try this

Expand SAPALEINApp,Flows and double click ALEINMSGFLW


See

10. Specify the queues as Failure and the result nodes as Output. In the example below, the
Output Queue has been configured as GRZQ1, and the Error Queue has been configured
as GRZ2:

Figure 17
11. Save the workspace and deploy the application to the execution group. Right-click on the
execution group and deploy the above message flow to an execution group in WebSphere
Message Broker. Right-click on the execution group click Deploy. Select the message
flow to be deployed from the resulting window and then click OK:

Figure 18
Testing ALE REQ inbound on WebSphere Message Broker
1. Log in to the SAP System and send the ALE REQ doc from the SAP EIS:

Figure 19

2. Find the existing ALEREQ stat:3 IDoc from /nwe02. You can select the IDoc 0136949 to
send it to the client using the RFC Program ID, which in this case is the PTCSERVER on
z/OS:

Figure 20
3. Submit the IDoc from /nwe19 and press F8:
F
Double Click Start Outbound Processing
igure 21

4. Specify the Port and Partner Number for the RFC Program Id being used. Provide the
message variant that is configured with the RFC program ID:

Figure 22
5. Verify that the message flow is correct by using the message queue that has been
configured for the broker on z/OS under MQ Explorer. An entry is made in SAPOUTQ if
the message output is successful, or in SAPERRORQ in case of failure. Since you have
mapped SAPOUTQ as the success queue port, after successful execution, the Open
Output Count in SAPOUTQ will be incremented to 1, as shown below:

Figure 24
Conclusion
This article showed you how to configure, deploy, and test the WebSphere Adapter for SAP
when using Integration Bus Node and the Integration Bus Toolkit to connect to an SAP ERP
system.

In the case you want to change from one client to another or from DEV to PRD ,you can use
same resources.But you have to run an Iterative Discovery…..
Readjust to new environment.Adjust you queues and save.Redeploy the bar file.

You might also like