The following sections describe the configuration setup required to run the samples consisting of the SAP Input and SAP Request nodes.
Before the SAP samples can be successfully imported, the SAP Java Connector (SAP
JCo) interface libraries and JAR
files must be copied to the appropriate locations in the WebSphere Message Broker Toolkit.
- Copy the dependencies libraries (sapjcorfc.dll, librfc32.dll) to system path <WMB_INSTALL>\jdk\jre\bin, where <WMB_INSTALL> represents the toolkit installation directory.
- Copy sapjco.jar into the target server runtime directory <WMB_INSTALL>\runtimes\base_v61_stub\runtimes
- (Windows users) Install the msvcp71.dll and msvcr71.dll files in
the Windows system path. See SAP Note 684106 on the SAP Service Marketplace for additional details. The
DLL files are contained in the attachments section of the SAP Note along
with instructions on how to install them. You must have a valid user
name and password for the SAP Service Marketplace to view the SAP Note.
When using broker inbound messaging, the SAP system must be configured so that it can uniquely identify the broker as a target destination. SAP creates several components (RFC Destinations, Ports, Logical Systems, Distribution Models and Partner Profiles) in order to configure this connection.
Create the RFC connection from the SAP system to the broker
- Log in to your SAP system.
- Go to the SM59 transaction, Configuration of RFC connections.
- Click TCP/IP connections and click Create.
- Check that the connection type is set to T
- Set RFC Destination name to an appropriate value, for example SAMPRFC.
- Select Registered Server Program in the Technical Settings tab
- Set the Program ID to match the Program ID that is specified in the broker adapter, for example, SAMPRFC.
- Click Save to save the settings.
- Enter a description in the Description 1 field, for example, RFC for Sample.
- Enter a description in the Description 2 field, for example, your name.
- Click MDMP & Unicode.
- Select Unicode.
- Click the green tick on the pop-up window.
- Click Save.
Create a Logical System
- Go to the BD54 transaction, Change/View Logical Systems
- Click the green tick on the pop-up warning that the table is cross-client.
- Click New Entries.
- Enter a name for the logical system in the first field, for example, SAMPRFC.
- Enter a description for the logical system in the second field, for example, Logical System for
sample.
- Click Save.
- A pop-up window is displayed. If a workbench request number is displayed, click the green tick. If no number is displayed click New Request, and enter a description in the Create Request window. Click Save to generate a request number. Click the green tick to continue.
- Go to transaction SCC4, Display/view Clients Overview.
- Double click the client that you are using, for example, 001.
- On the next page, make a note of the entry in the field Logical System, for example, CLNT001.
Create a Distribution Model
- Go to transaction BD64, Maintenance of Distribution Model.
- Switch to Edit mode by pressing the F9 key.
- Click Create model view.
- Enter a Short Text description, for example, Model for sample.
- Enter a Technical Name, for example, SAMPRFC and click the green tick.
- Select the entry that you created, and click Add message type.
- In the pop-up window, select the Sender field and click the icon next to it.
- A pop-up window is displayed with a selection of Logical Systems, select the client name you recorded from the SCC4 transaction in the previous step.
- Click the green tick.
- Select the Receiver field and click the icon next to it.
- Select the Logical System that you have created, for example, SAMPRFC. Click the green tick.
- In Message Type, enter MATMAS (the type of IDoc that you use in the sample) and click the green tick.
- Click Save, in the Distribution Model window.
- Expand the Model you have created to view model, sender, receiver and message type.
- Select the message type, MATMAS.
- Click Environment >Generate Partner Profiles.
- In Generate Partner Profile, click Execute to generate a result screen.
- Review the generated items.
- Go to transaction WE21, Ports in IDoc processing
- Expand Ports/Transactional RFC. The new port is displayed at the bottom of the list. The port has a name format similar to A0000000xx.
- Click on the port and enter a Description.
- Click Save.
Review the Partner Profile
- Go to transaction WE20, Partner profiles
- Expand Partner Profiles/Partner Type LS and click on the partner that you created, for example, SAMPRFC.
- In the Outbound parameters table, double click the message type MATMAS. A window is displayed containing the generated port name, for example, A0000000xx and a basic type of MATMAS05.
For successful deployment of message flows with SAP nodes, you must configure the message broker runtime with the prerequisite SAP JCo libraries. These libraries are used by the underlying SAP adapter component to establish connections with the SAP system.
You must run the following mqsichangeproperties commands from a command environment to set the location of the directories that contain the SAP JCo libraries.
- Run the following commands:
mqsichangeproperties WBRK61_DEFAULT_BROKER -c EISProviders -o SAP -n jarsURL -v C:\SAP_JCO
mqsichangeproperties WBRK61_DEFAULT_BROKER -c EISProviders -o SAP -n nativeLibs -v C:\SAP_JCO
- To verify that the properties have been setup correctly, run the following command:
mqsireportproperties WBRK61_DEFAULT_BROKER -c EISProviders -o SAP -r
- Import the SAP Sample into your workspace.
- Switch to the Broker Application Development perspective.
- Expand the SapInboundMatMasSampleMSet message set project.
- Click Adapters > Inbound > SAP.
- Double click SapMatMasInbound.inadapter to open an editor where you can specify the
connection parameters required to access your SAP system.
- Enter the following settings in the editor:
- Gateway hostname or IP address.
- Gateway service, for example, sapgw00. The Gateway Service can be found using transaction code SMGW (Gateway monitor) under the column titled Remote TP Name.
- RFC Program ID, for example, SAMPRFC
- SAP Client ID (from SAP txn SCC4 ).
- Username for SAP system.
- Password corresponding to the username.
- Language Code if the language is not English.
- Hostname or IP address of the SAP Application server.
- SAP System Number.
- Save the updated adapter.
- Expand the message flow project SapInboundMatMasSampleMFlow.
- Double click SapInboundMatMasSample.bar to open the Broker Archive editor.
- Click on the Prepare tab.
- Click Build broker archive.
- Deploy the SapInboundMatMasSample.bar bar file to the broker.
- Import the SAP Sample into your workspace.
- Switch to the Broker Application Development perspective.
- Expand the SapOutboundCustomerMSet message set project.
- Click Adapters > Outbound > SAP.
- Double click SapCustomerOutbound.outadapter to open an editor where you can specify the connection parameters required to access your SAP system.
- Enter the following settings in the editor:
- Username for SAP system
- Password corresponding to the Username
- SAP Client ID
- Language Code if the language is not English.
- The SAP System Number.
- Hostname or IP address of the SAP Application server.
- Save the updated adapter.
- Expand the message flow project SapOutboundCustomerSampleMFlow.
- Double click SapOutboundCustomerSample.bar to open the Broker Archive editor.
- Click on the Prepare tab.
- Click on the Build broker archive.
- Deploy the SapOutboundCustomerSample.bar bar file to the broker.
Setup the following queues on the MQ Queue Manager associated with your broker:
- SAP_MATMAS_OUTQ
- SAP_CUSTOMER_INQ
- SAP_CUSTOMER_OUTQ
- SAP_CUSTOMER_ERRQ
Back to sample home