tibcoactivematrix adapterfor sap examples · this website is the sap help portal wh ere you can...

47
TIBCO ActiveMatrix ® Adapter for SAP Examples Software Release 7.0 July 2013 Two-Second Advantage ®

Upload: others

Post on 15-Mar-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix® Adapter forSAP

ExamplesSoftware Release 7.0July 2013

Two-Second Advantage®

Page 2: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDEDOR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITEDADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLEDSOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FORANY OTHER PURPOSE.USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF ALICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSEAGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USERLICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THESOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE) OR IF THERE IS NO SUCH SOFTWARELICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATEDIN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMSAND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND ANAGREEMENT TO BE BOUND BY THE SAME.This document contains confidential information that is subject to U.S. and international copyright laws andtreaties. No part of this document may be reproduced in any form without the written authorization of TIBCOSoftware Inc.TIBCO, Two-Second Advantage, TIBCO ActiveMatrix Adapter for SAP, TIBCO ActiveMatrix Binding Type forAdapter, TIBCO ActiveMatrix BusinessWorks, TIBCO ActiveMatrix Implementation Type for TIBCO Adapters,TIBCO ActiveMatrix Service Bus, TIBCO ActiveMatrix Service Grid, TIBCO Adapter SDK, TIBCOAdministrator, TIBCO Business Studio, TIBCO Designer, TIBCO Enterprise Message Service, TIBCO Hawk,TIBCO Rendezvous, and TIBCO Runtime Agent are either registered trademarks or trademarks of TIBCOSoftware Inc. in the United States and/or other countries.Enterprise Java Beans (EJB), Java Platform Enterprise Edition (Java EE), Java 2 Platform Enterprise Edition(J2EE), and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle Corporationin the U.S. and other countries.All other product and company names and marks mentioned in this document are the property of theirrespective owners and are mentioned for identification purposes only.THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALLOPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAMETIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFICOPERATING SYSTEM PLATFORM.THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS ORIMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS.CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BEINCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKEIMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED INTHIS DOCUMENT AT ANY TIME.THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY ORINDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDINGBUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.Copyright © 1999-2013 TIBCO Software Inc. ALL RIGHTS RESERVED.TIBCO Software Inc. Confidential Information

Page 3: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| iii

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v

Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viTIBCO ActiveMatrix Adapter for SAP Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viOther TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viThird-Party Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .viii

Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Connecting with TIBCO Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiHow to Join TIBCOmmunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiHow to Access TIBCO Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiHow to Contact TIBCO Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii

Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

Overview of Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Prerequisites of Running Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Using TIBCO ActiveMatrix BusinessWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Importing Example File into TIBCO Designer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Chapter 2 Dynamic Logon and Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

Description of Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Configuration of Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Task A Create SalesOrder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Task B Start EMS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Chapter 3 Working with Subscription Service and Request-Response Service . . . . . . . . . . . .15

Description of Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Configuration of Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Task A Set Up Vendor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Task B Start EMS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Page 4: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

iv |

Chapter 4 Working with Publication Service and Remote TIDManager . . . . . . . . . . . . . . . . . . 23

Description of Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Configuration of Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Task A Set Up CREMAS, DEBMAS, and MATMAS Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Task B Start EMS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Chapter 5 Working with Request-Response Invocation Service and Request-Response Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Description of Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Configuration of Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Task A Set Up JMS or RV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Task B Start EMS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Page 5: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| v

Preface

TIBCO ActiveMatrix Adapter for SAP is used as a bi-directional gateway between SAP applications and applications configured for the TIBCO environment.

The adapter can remotely connect and operate with SAP systems running on OS platforms not supported by the adapter.

This document includes examples that demonstrate how TIBCO ActiveMatrix Adapter for SAP interacts with TIBCO ActiveMatrix BusinessWorks.

Topics

• Related Documentation, page vi

• Typographical Conventions, page ix

• Connecting with TIBCO Resources, page xii

Page 6: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

vi | Related Documentation

Related Documentation

This section lists documentation resources you may find useful.

TIBCO ActiveMatrix Adapter for SAP DocumentationThe following documents form the TIBCO ActiveMatrix Adapter for SAP documentation set:

• TIBCO ActiveMatrix Adapter for SAP Concepts Read this manual for terminology and concepts of the product. Before reading other manuals in this documentation set, you need to be familiar with the information in this manual.

• TIBCO ActiveMatrix Adapter for SAP Installation Read this manual for instructions on site preparation and installation.

• TIBCO ActiveMatrix Adapter for SAP Configuration and Deployment Read this manual for instructions on how to create, configure, and deploy adapter projects.

• TIBCO ActiveMatrix Adapter for SAP Examples Read this manual to work through the examples provided with the adapter.

• TIBCO ActiveMatrix Adapter for SAP Release Notes Read the release notes for a list of new and changed features. This document also contains lists of known issues and closed issues for this release.

Other TIBCO Product DocumentationYou may find it useful to read the documentation for the following TIBCO products:

Table 1 TIBCO Products

TIBCO Product Description

TIBCO ActiveMatrix® Binding Typefor Adapters

This product is a TIBCO ActiveMatrix binding that integrates TIBCO Adapters with the TIBCO ActiveMatrix environment.

TIBCO ActiveMatrix BusinessWorks™ This product provides an integration platform that enables companies to rapidly integrate systems and automate business processes.

Page 7: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Preface | vii

TIBCO ActiveMatrix® Implementation Typefor TIBCO® Adapters

This product provides capabilities to upload and deploy adapter configurations (packaged as EAR files) using TIBCO ActiveMatrix Administrator GUI.

TIBCO ActiveMatrix® Service Bus This product is a lightweight enterprise service bus (ESB) that mediates the communication between applications and services by routing and transforming disparate data formats and transport protocols.

TIBCO ActiveMatrix® Service Grid This product is a scalable and extensible platform for developing, deploying, and managing applications that conform to a service-oriented architecture.

TIBCO® Adapter SDK This product provides a class library that helps developers implement an adapter with minimal effort.

TIBCO Administrator™ This product provides capabilities for managing users, monitoring machines, and deploying and managing applications that use TIBCO products.

TIBCO Business Studio™ This product provides capabilities that help business analysts document business processes, solution engineers implement business processes, and SOA developers create composite applications.

TIBCO Designer™ This product provides a graphical user interface to create TIBCO ActiveMatrix BusinessWorks process definitions, or create or modify TIBCO Adapter configurations.

TIBCO Enterprise Message Service™ This product sends messages from your applications in a format that conforms to the Java Messaging Service (JMS) specification.

TIBCO Hawk® This product is for monitoring and managing distributed applications and systems throughout the enterprise.

TIBCO Rendezvous® This product uses messages to enable distributed application programs to communicate across a wide variety of hardware platforms and programming languages.

TIBCO Runtime Agent™ This product is a bundle of TIBCO software and third-party software that is required to run many TIBCO applications such as TIBCO ActiveMatrix BusinessWorks, TIBCO Adapters, and so on.

Table 1 TIBCO Products (Cont’d)

TIBCO Product Description

Page 8: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

viii | Related Documentation

Third-Party DocumentationYou may also find it useful to read the documentation on the following websites:

• http://help.sap.com

This website is the SAP Help Portal where you can find documentation on all SAP products, including SAP ECC 6.0 releases and SAP NetWeaver. In order for TIBCO ActiveMatrix Adapter for SAP to exchange data with SAP systems, you must make configurations in the SAP system to allow for communication and the exchange of messages to take place. This website offers detailed information on such configuration.

• http://service.sap.com/instguides

This website is provided by the SAP Support Portal and contains documentation on installations and upgrades. The documentation available contains information on components that can be used along with TIBCO ActiveMatrix Adapter for SAP, and the installation of the Secure Network Communications (SNC) libraries where security is required between the adapter and SAP systems.

• http://service.sap.com/connectors

This website provides information on the different types of SAP Connectors available. TIBCO ActiveMatrix Adapter for SAP is based on the SAP Java Connector libraries. You can download the latest versions of these libraries from this website.

Page 9: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Preface | ix

Typographical Conventions

The following typographical conventions are used in this manual.

Table 2 General Typographical Conventions

Convention Use

ENV_NAME

TIBCO_HOME

TIBCO products are installed into an installation environment. A product installed into an installation environment does not access components in other installation environments. Incompatible products and multiple instances of the same product must be installed into different installation environments.

An installation environment consists of the following properties:

• Name Identifies the installation environment. This name is referenced in documentation as ENV_NAME. The default value is TIBCO_HOME.

• Directory The folder into which the product is installed. This folder is referenced in documentation as TIBCO_HOME.

TIB_ADR3_HOME TIBCO ActiveMatrix Adapter for SAP is installed into a directory within a TIBCO_HOME directory. This directory is referenced in documentation as TIB_ADR3_HOME. The default value of TIB_ADR3_HOME depends on the operating system. For example, on Windows systems, the default value is C:\tibco\adapter\adr3\ReleaseNumber.

code font Code font identifies commands, code examples, filenames, pathnames, and output displayed in a command window. For example: Use MyCommand to start the foo process.

bold code font Bold code font is used in the following ways:

• In procedures, to indicate what a user types. For example: Type admin.

• In large code samples, to indicate the parts of the sample that are of particular interest.

• In command syntax, to indicate the default parameter for a command. For example, if no parameter is specified, MyCommand is enabled: MyCommand [enable | disable].

Page 10: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

x | Typographical Conventions

italic font Italic font is used in the following ways:

• To indicate a document title. For example: See TIBCO ActiveMatrix Adapter for SAP Concepts.

• To introduce new terms. For example: A portal page may contain several portlets. Portlets are mini-applications that run in a portal.

• To indicate a variable in a command or code syntax that you must replace. For example: MyCommand PathName.

Key combinations Key name separated by a plus sign indicate keys pressed simultaneously. For example: Ctrl+C.

Key names separated by a comma and space indicate keys pressed one after the other. For example: Esc, Ctrl+Q.

The note icon indicates information that is of special interest or importance, for example, an additional action required only in certain circumstances.

The tip icon indicates an idea that could be useful, for example, a way to apply the information provided in the current section to achieve a specific result.

The warning icon indicates the potential for a damaging situation, for example, data loss or corruption if certain steps are taken or not taken.

Table 2 General Typographical Conventions (Cont’d)

Convention Use

Page 11: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Preface | xi

Table 3 Syntax Typographical Conventions

Convention Use

[ ] An optional item in a command or code syntax.

For example:

MyCommand [optional_parameter] required_parameter

| A logical OR that separates multiple items of which only one may be chosen.

For example, you can select only one of the following parameters:

MyCommand param1 | param2 | param3

{ } A logical group of items in a command. Other syntax notations may appear within each logical group.

For example, the following command requires two parameters, which can be either the pair param1 and param2, or the pair param3 and param4.

MyCommand {param1 param2} | {param3 param4}

In the next example, the command requires two parameters. The first parameter can be either param1 or param2 and the second can be either param3 or param4:

MyCommand {param1 | param2} {param3 | param4}

In the next example, the command can accept either two or three parameters. The first parameter must be param1. You can optionally include param2 as the second parameter. And the last parameter is either param3 or param4.

MyCommand param1 [param2] {param3 | param4}

Page 12: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

xii | Connecting with TIBCO Resources

Connecting with TIBCO Resources

How to Join TIBCOmmunityTIBCOmmunity is an online destination for TIBCO customers, partners, and resident experts. It is a place to share and access the collective experience of the TIBCO community. TIBCOmmunity offers forums, blogs, and access to a variety of resources. To register, go to http://www.tibcommunity.com.

How to Access TIBCO DocumentationYou can access TIBCO documentation here:

http://docs.tibco.com

How to Contact TIBCO SupportFor comments or problems with this manual or the software it addresses, contact TIBCO Support as follows:

• For an overview of TIBCO Support, and information about getting started with TIBCO Support, visit this site:

http://www.tibco.com/services/support

• If you already have a valid maintenance or support contract, visit this site:

https://support.tibco.com

Entry to this site requires a user name and password. If you do not have a user name, you can request one.

Page 13: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| 1

Chapter 1 Introduction

This chapter introduces procedures and prerequisites to be configured before you start the examples provided with the TIBCO ActiveMatrix Adapter for SAP installation. Detailed information for the examples are provided in subsequent chapters of this guide.

Topics

• Overview of Introduction, page 2

• Prerequisites of Running Examples, page 3

Page 14: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

2 | Introduction

Overview of Introduction

The examples discussed in this guide provides the various usage patterns available from TIBCO ActiveMatrix Adapter for SAP in conjunction with TIBCO ActiveWorks BusinessWorks.

The following are usage patterns illustrated in this guide:

• Dynamic Login and Transactions. See Dynamic Logon and Transactions, page 7.

• Subscription Service and Request-Response Service. See Working with Subscription Service and Request-Response Service, page 15.

• Publication Service with Remote TID Manager. See Working with Publication Service and Remote TIDManager, page 23.

• Request-Response Service and Request-Response Invocation Service. See Working with Request-Response Invocation Service and Request-Response Service, page 29.

Page 15: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Prerequisites of Running Examples | 3

Prerequisites of Running Examples

There are four examples shipped with the adapter and the example files are located in the following directory: TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks

The examples are:

• Dynamic Logon and Transactions, page 7

• Working with Subscription Service and Request-Response Service, page 15

• Working with Publication Service and Remote TIDManager, page 23

• Working with Request-Response Invocation Service and Request-Response Service, page 29

Before running the examples you need to configure the following topics:

• Using TIBCO ActiveMatrix BusinessWorks, page 3

• Importing Example File into TIBCO Designer, page 4

Using TIBCO ActiveMatrix BusinessWorksIf you use the adapter with TIBCO ActiveWorks BusinessWorks, the following software must be installed to run the examples:

• TIBCO ActiveMatrix Adapter for SAP

• TIBCO ActiveWorks BusinessWorks

• TIBCO Administrator

• SAP System

• TIBCO Runtime Agent

See the readme file for the supported versions of the software listed above.

TIBCO ActiveWorks BusinessWorks examples use TIBCO Designer to create an Enterprise Archive File (EAR) and use TIBCO Administrator to deploy the EAR file.

In TIBCO Administrator, make sure all software components needed by the adapter instance are installed on one or more machines that are part of a TIBCO Administrator Domain and that the software is registered in the domain.

Use TIBCO Domain Utility to add a machine to a TIBCO Administrator Domain.

In TIBCO Administrator, use the Resource Management > Machines console to register software.

Page 16: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

4 | Introduction

Refer to the TIBCO Administrator documentation for more information.

The files for the examples are located at:

TIBCO_HOME\adapter\adr3\version_number\examples\BusinessWorks\<BusinessObjectName>

where version_number is the adapter’s version number.

Importing Example File into TIBCO DesignerAll four examples are in the zip archive file format.

To import the examples into TIBCO Designer, use the following steps:

1. Open TIBCO Designer.

2. In the Initial dialog box click the New empty project button and save the project as DynamicLogonExternalCommit.

3. Click the Project > Import Full Project button.

4. Click the Zip Archive tab and browse to locate the DynamicLogonExternalCommit file. The file is located in the directory of TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\DynamicLogonExternalCommit

5. In the Import - Options dialog, check the checkboxes for:

— Replace existing global variables with those in import, and

— Overwrite on name conflict.

6. Select one encoding option from the TIBCO Messaging Encoding drop-down list.

7. Configure the applicable values according to your system setting after you select a value from the Multi-User System drop-down list.

8. Click the Test Configuration button.

9. Click the OK button.

10. Click the Open Advanced Editor button, in the Global Variables panel.

Page 17: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Prerequisites of Running Examples | 5

11. Enter applicable values for the following global variables according to your system setting, in the Global Variables panel.— AppServer

— Client

— GatewayHost

— GatewayService

— JmsProviderUrl

— Password

— ProgramID

— SAP_HOME

— SystemNumber

— UserName

12. Click the OK button.

13. Click the Save button.Now the DynamicLogonExternalCommit example is loaded into TIBCO Designer.

Page 18: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

6 | Introduction

Page 19: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| 7

Chapter 2 Dynamic Logon and Transactions

The example illustrates how the dynamic logon and transaction support features of TIBCO ActiveMatrix Adapter for SAP can be used in a TIBCO ActiveWorks BusinessWorks process. This example uses TIBCO JMS as its transport type.

Topics

• Description of Example, page 8

• Configuration of Example, page 9

• Running the Example, page 12

• Expected Results, page 14

Page 20: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

8 | Dynamic Logon and Transactions

Description of Example

This example illustrates how to use the dynamic logon and transaction support features of the adapter in a TIBCO ActiveWorks BusinessWorks process. The example has one Create SalesOrder process.

The Create SalesOrder process uses the input XML file (containing details about the creation of sales order) to invoke the Request-Response Service and create a sales order in the SAP system. An output file is created whether the sales order is created or not.

When the process invokes the Request-Response Service, logon parameters are supplied to create a dynamic connection for creating the sales order in the SAP system. The dynamic logon is configured to use the various client connections supported by the inbound SAP adapter. These include Dedicated Client Connection, Load Balancing Client Connection, and SNC Client Connection.

For creating the sales order in the SAP system. SAP function module BAPI_SALESORDER_CREATEFROMDAT1 is used. Since the BAPI transaction requires an external commit, if the sales order is created in the SAP system then SAP function module BAPI_TRANSACTION_COMMIT is subsequently invoked and then the SAP function module BAPI_SALESORDER_GETSTATUS is subsequently invoked in order to get information on the sales order created. If the sales order is not created in the SAP system then the SAP function module BAPI_TRANSACTION_ROLLBACK is subsequently invoked. During these subsequent calls to the SAP system, this example shows how to maintain user context between various invocations so that the proper state is maintained in the SAP system.

For the above TIBCO ActiveWorks BusinessWorks process, modify the data in the input XML file corresponding to your SAP system.

Page 21: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Configuration of Example | 9

Configuration of Example

Before starting the example you must import the sample project zip file and save it in a new project.

Use the following tasks to set up the example.

• Task A Create SalesOrder, page 9

• Task B Start EMS Server, page 11

Task A Create SalesOrderUse the following steps to set up the Create SalesOrder process.

In TIBCO Designer:

1. Click the New empty project button and save the project as DynamicLogonExternalCommit, in the initial dialog box.

2. Click the Project > Import Full Project button.

3. Click the Zip Archive tab and browse to locate the DynamicLogonExternalCommit file. The file is located in the following folder: TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\DynamicLogonExternalCommit

4. In the Import - Options dialog, check the checkboxes for

— Replace existing global variables with those in import, and

— Overwrite on name conflict.

5. Select DynamicLogonExternalCommit in the Project panel.

6. Click the Apply button.

Page 22: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

10 | Dynamic Logon and Transactions

7. Enter values for the following global variables:

— UDConnection\AppServer

— UDConnection Client

— UDConnection\ConnectionType

— UDConnection\GroupName

— UDConnection\Language

— UDConnection\MsgServer

— UDConnection\Password

— UDConnection\SNC_lib

— UDConnection\SNC_mode

— UDConnection\SNC_partnername

— UDConnection\SNC_qop

— UDConnection\SystemName

— UDConnection\SystemNumber

— UDConnection\UserName

— JMSProviderUrl

— ASAP_HOME (Home directory of the adapter, TIBCO_HOME\tibco\adapter\adr3\version_number)

8. Expand the Project > Export Full Project > Local Repository and specify values for Project Name and Dir Name directory for the .dat file.

9. Modify the repourl parameter in adr3.tra under TIBCO_HOME\tibco\adapter\adr3\version_number\bin folder to point to the dat file specified in step 8.

10. Modify configurl parameter to reflect R3AdapterConfiguration, in the same TRA file.

11. Save the project.

12. Run the adapter from the command line as follows:

adr3-propFile <adapter_home>\bin\adr3.tra

For those global variables defined inside Adjunction folder, populate the global variables based on the type of connection that isrequired.

Page 23: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Configuration of Example | 11

Task B Start EMS ServerThis example uses the JMS transport type. Ensure that TIBCO Enterprise Message Service server is running and accessible to the machine on which the adapter is installed before running any of the processes.

Page 24: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

12 | Dynamic Logon and Transactions

Running the Example

Use the following steps to run the example.

In TIBCO Designer:

1. Click the Create SalesOrder process, in the Project panel.

2. Click the Set Breakpoints button.

3. Check the Select All checkbox then click the OK button in the window that appears.

4. Click the Tester tab, in the Test panel.

5. Click the Start testing viewed process button.

6. Click the Start Selected button, which in the Process Selection window that appears, the Create SalesOrder Process is selected by default. The process is now in Test mode. Any change to the input XML file starts the process.

7. Click the Step to next activity button to step through the process, once the Process Starter is highlighted (indicating a process has started).

8. Click the Stop Testing button to return to design mode.

Use the following step to test the process.

1. To trigger the Create SalesOrder process, you must make a change in the Create_SalesOrder_Send_Template.xml file and save.

Here is an example of the XML file.

<?xml version="1.0"?><SalesOrderCreateFromDat1> <OrderHeaderln> <DOC_NUMBER></DOC_NUMBER> <DOC_TYPE>TA</DOC_TYPE> <COLLECT_NO></COLLECT_NO> <SALES_ORG>3000</SALES_ORG> <DISTR_CHAN>10</DISTR_CHAN> <DIVISION>00</DIVISION> </OrderHeaderln> <OrderItemsln> <item> <ITM_NUMBER>000010</ITM_NUMBER> <HG_LV_ITEM>000000</HG_LV_ITEM> <PO_ITM_NO></PO_ITM_NO> <MASTERIAL>GTS-010</MATERIAL> <CUST_MAT></CUST_MAT> <BATCH></BATCH> <DLV_GROUP>000</DLV_GROUP> <PART_DLV></PART_DLV> <REASON_REJ></REASON_REJ> <BILL_BLOCK></BILL_BLOCK>

Page 25: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Running the Example | 13

<BILL_DATE></BILL_DATE> <PLANT></PLANT> <STORE_LOC></STORE_LOC> <TARGET_QTY>0000000000050</TARGET_QTY> <TARGET_QTY></TARGET_QTY> <REQ_QTY>0000000001000</REQ_QTY> <SALES_UNIT></SALES_UNIT> <ITEM_CATEG></ITEM_CATEG> <SHORT_TEXT></SHORT_TEXT> <REQ_DATE>20120413</REQ_DATE> <DATE_TYPE></DATE_TAPE> <REQ_TIME></REQ_TIME> </item></OrderItermsln><OrderPartners> <item1> <PARTN_ROLE>WE</PARTN_ROLE> <PARTN_NUMB>0000001451</PARTN_NUMB> <ITM_NUMBER>000000</ITM_NUMBER> </item1> </OrderPartners></SalesOrderCreateFromDat1>

The process with the help of the XML parser and the mapper constructs the data required for the adapter Request-Response Service. The invoked task triggers the Request-Response Service. The Request-Response Service executes the SAP function module BAPI_SALESORDER_CREATEFROMDAT1, which creates a sales order in the SAP system using the details given in the above XML file. The Request-Response Service sends back the reply to TIBCO ActiveWorks BusinessWorks. TIBCO ActiveWorks BusinessWorks receives the reply and then invokes the task depending on the reply returned. If no error is returned on the reply then another invoked task triggers a Request-Response Service. The Request-Response Service executes the SAP function module BAPI_TRANSACTION_COMMIT, which commits the sales order in the SAP system and executes the SAP function module BAPI_SALESORDER_GETSTATUS for retrieving information on the sales order created. If an error is returned on the reply then another invoke task triggers a Request-Response Service. The Request-Response Service executes the SAP function module BAPI_TRANSACTION_ROLLBACK, which rolls back any work done in the SAP system. If an error is returned on the initial invoke then the error would be rendered and written to an output file. If the sales order was created or not able to be created, then information on the sales order or the error would also be rendered and written to an output file.

Page 26: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

14 | Dynamic Logon and Transactions

Expected Results

The example results can be viewed in the respective XML files written to: TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\DynamicLogonInboundTransaction

Create SalesOrder Data is created based on the order details specified in the input XML and a sales order is created in the SAP system. An XML file OrderStatus.xml (containing the sales order number of the sales order created in the SAP system) is created. In case the sales order cannot be created in the SAP system or there was an error returned by the Request-Response Service, any error message would also be saved to the OrderStatus.xml file.

Page 27: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| 15

Chapter 3 Working with Subscription Service and Request-Response Service

The example illustrates how the Subscription Service and Request-Response Service of TIBCO ActiveMatrix Adapter for SAP can be used in a TIBCO ActiveWorks BusinessWorks process.

Topics

• Description of Example, page 16

• Configuration of Example, page 17

• Running the Example, page 19

• Expected Results, page 21

Page 28: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

16 | Working with Subscription Service and Request-Response Service

Description of Example

The example illustrates how the Subscription Service and Request-Response service of the adapter can be used in a TIBCO ActiveWorks BusinessWorks process. The example has one Vendor process.

The Vendor process uses the input XML file (containing details about the vendor to be created) to invoke the Request-Response Service for validating data being supplied in the input XML file and then publishes a message to the adapter for creating the vendor in the SAP system.

For validating the data provided in the input XML file, SAP function module BAPI_GL_ACC_EXISTENCECHECK is used where the G/L account in the input XML file is validated. If the G/L account is valid then a message will be published to the adapter for creating the vendor in SAP using a CREMAS04 IDoc. If the G/L account is not valid then an error is written to an output file.

Page 29: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Configuration of Example | 17

Configuration of Example

Before starting the example you must import the sample project zip file and save it in a new project.

Use the following tasks to set up the example.

• Task A Set Up Vendor, page 17

• Task B Start EMS Server, page 18

Task A Set Up VendorUse the following steps to set up the Set Up Vendor process.

In TIBCO Designer:

1. Click the New empty project button and save the project as InboundIDocWithInboundBAPI, in the initial dialog.

2. Click Project > Import Full Project button.

3. Click the Zip Archive tab and browse to locate the InboundIDocWithInboundBAPI file. The file is located in the following folder: TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\InboundIDocWithInboundBAPI

4. Check the checkboxes for

— Replace existing global variables with those in import, and

— Overwrite on name conflict,

in the Import - Options dialog.

5. Select InboundIDocWithInboundBAPI in the Project panel.

6. Check the Include Existing Files checkbox.

7. Click the Apply Any change to the input XML file starts the process button.

Page 30: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

18 | Working with Subscription Service and Request-Response Service

8. Enter values for the following global variables:

— AppServer

— Client

— Password

— SystemNumber

— UserName

— JMSProviderUrl

— ASAP_HOME (Home directory of the adapter, TIBCO_HOME\tibco\adapter\adr3\version_number

9. Expand the Project > Export Full Project > Local Repository directory and specify values for Project Name and Dir Name for the .dat file.

10. Modify the repourl parameter in adr3.tra under TIBCO_HOME\tibco\adapter\adr3\version_number\bin folder to point to the dat file specified in step 9.

11. Modify the configurl parameter to reflect R3AdapterConfiguration, in the same TRA file.

12. Save the project.

13. Run the adapter from the command line as follows:

adr3-propFile <adapter_home>\bin\adr3.tra

Task B Start EMS ServerThis example uses the JMS transport type. Ensure that the TIBCO Enterprise Message Service server is running and accessible to the machine on which the adapter is installed before running any of the processes.

Page 31: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Running the Example | 19

Running the Example

Use the following steps to run the example.

In TIBCO Designer:

1. Click the Vendor process, in the Project panel.

2. Click the Set Breakpoints button.

3. Check the Select All checkbox then click the OK button, in the window that appears.

4. Click the Tester tab, in the Test panel.

5. Click the Start testing viewed process button.

6. Click the Start Selected button, in the Process Selection window that appears, the Vendor process is selected by default. The process is now in Test mode. Any change to the input XML file starts the process.

7. Click the Step to next activity button to step through the process, once the Process Starter is highlighted (indicating a process has started).

8. Click the Stop Testing button to return to design mode.

Use the following step to test the process.

To run each example:

1. To trigger Create SalesOrder process, you must make a change in the VendorInputFile.xml file and save.

Here is an example of the XML file.

<?xml version="1.0" encoding="UTF-8"?><VENDOR_INPUT> <Header> <TABNAM>EDI_DC40</TABNAM> <MANDT>800</MANDT> <DOCREL>700</DOCREL> <DIRECT>2</DIRECT> <IDOCTYP>CREMAS05</IDOCTYP> <MESTYP>CREMAS</MESTYP> <SNDPOR>SAPDE1</SNDPOR> <SNDPRT>LS</SNDPRT> <SNDPRN>T90CLNT090</SNDPRN> <RCVPOR>TIBCOSAP3</RCVPOR> <RCVPOR>LS</RCVPRT> <RCVPRN>TIBCOSAP3</RCVPRN> </Header> <SEGMENT1> <SEGNAM>E2LFA1M</SEGNAM> <MANDT>800</MANDT> <MSGFN>001</MSGFN>

Page 32: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

20 | Working with Subscription Service and Request-Response Service

<ANRED>Mr</ANRED> <KTOKK>KRED</KTOKK> <LAND1>DE</LAND1> <NAME1>Chris Jones</NAME1> <ORT01>Frankfurt</ORT01> <PSTL2>65933</PSTL2> <SORTL>TIBDEMO</SORTL> <SPRAS>E</SPRAS> <STRAS>An der oberen Lache 3303</STRAS></SEGMENT1></SEGMENT2> <SEGNAM>E2LFB1M</SEGNAM> <MSGFN>001</MSGFN> <BUKRS>1000</BUKRS> <AKONT>0000160000</AKONT> </SEGMENT2></VENDOR_INPUT>

The process with the help of the XML parser and the mapper constructs the data required for the Request-Response Service. The invoke task triggers the Request-Response Service. The Request-Response Service executes the SAP function module BAPI_GL_ACC_EXISTENCECHECK, which validates the G/L account supplied from the above XML file. The Request-Response Service sends back the reply to TIBCO ActiveWorks BusinessWorks. TIBCO ActiveWorks BusinessWorks receives the reply and would then invoke the next task depending on the reply returned. If no error is returned on the reply then a message would be published to the adapter using data supplied from the above input XML file for creating the vendor in the SAP system. If the G/L account is invalid then the error would be rendered and written to an output file.

Page 33: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Expected Results | 21

Expected Results

If there is an error, the error can be viewed in the respective XML files written to TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\InboundIDocWithInboundBAPI

Vendor In this process, data is created based on the vendor details specified in the input XML and a vendor is created in the SAP system. For the purposes of this example, the SAP system would need to be verified for the creation of the vendor.

Page 34: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

22 | Working with Subscription Service and Request-Response Service

Page 35: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| 23

Chapter 4 Working with Publication Service and Remote TIDManager

The example illustrates how the Publication Service from multiple outbound adapter instances of TIBCO ActiveMatrix Adapter for SAP can be used in a TIBCO ActiveWorks BusinessWorks process.

Topics

• Description of Example, page 16

• Configuration of Example, page 17

• Running the Example, page 19

• Expected Results, page 21

Page 36: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

24 | Working with Publication Service and Remote TIDManager

Description of Example

The example illustrates how the Publication Service from multiple outbound adapter instances of the adapter can be used in a TIBCO ActiveWorks BusinessWorks process. The example has three processes which are CREMAS, DEBMAS, and MATMAS process. Since there are multiple outbound adapter instances, this example also illustrates the usage of the remote TID Manager adapter instance.

• CREMAS Process Receives a message from the Publication Service and saves the message containing SAP Vendor Master Data to an output file.

• DEBMAS Process Receives a message from the Publication Service and saves the message containing SAP Customer Master Data to an input file.

• MATMAS Process Receives a message from the Publication Service and saves the message containing SAP Material Master Data to an input file.

Page 37: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Configuration of Example | 25

Configuration of Example

Before starting the example you must import the sample project zip file and save it in a new project.

Use the following tasks to set up the example.

• Task A Set Up CREMAS, DEBMAS, and MATMAS Processes, page 25

• Task B Start EMS Server, page 26

Task A Set Up CREMAS, DEBMAS, and MATMAS ProcessesUse the following steps to set up CREMAS, DEBMAS, and MATMAS processes.

In TIBCO Designer:

1. Click the New empty project button and save the project as OutboundIDocWithRemoteTIDManager, in the initial dialog box.

2. Click Project>Import Full Project button.

3. Click the Zip Archive tab and browse to locate the OutboundIDocWithRemoteTIDManager. The file is located in the following folder: TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\OutboundIDocWithRemoteTIDManager

4. Check the checkboxes for

— Replace existing global variables with those in import, and

— Overwrite on name conflict,

in the Import - Options dialog.

5. Select OutboundIDocWithRemoteTIDManager in the Project panel.

6. Click the File Poller button, for Vendor process.

7. Click the Browse button and select the corresponding input XML file from the path given in step 3, from the File Name field in the Configuration panel.

8. Check the Include Existing Files checkbox.

9. Click the Apply Any change to the input XML file starts the process button.

Page 38: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

26 | Working with Publication Service and Remote TIDManager

10. Enter values for the following global variables:

— GatewayHost

— GatewayService

— ProgramID

— JMSProviderUrl

— ASAP_HOME (Home directory of the adapter, TIBCO_HOME\tibco\adapter\adr3\version_number)

11. Expand the Project > Export Full Project > Local Repository directory and specify values for Project Name and Dir Name for the .dat file.

12. Modify the repourl parameter in adr3.tra under TIBCO_HOME\tibco\adapter\adr3\version_number\bin folder to point to the dat file specified in step 10.

13. Modify the configurl parameter to reflect R3AdapterConfiguration, in the same TRA file.

14. Save the project.

15. Run the adapter from the command line as following:

adr3-propFile <adapter_home>\bin\adr3.tra

16. Run the remote TID manager adapter from the command line as follows:

adrTIDManager-propFile <adapter_home>\bin\adr3TIDManager.tra

Task B Start EMS ServerThis example uses the JMS transport type. Ensure that the TIBCO Enterprise Message Service server is running and accessible to the machine on which the adapter is installed before running any of the processes.

To illustrate the usage of messages originating from multiple outbound adapters services you would need to repeat step 13 twice for each outbound adapter in the project.

Page 39: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Running the Example | 27

Running the Example

Use the following steps to run the example.

In TIBCO Designer:

1. Select the process you want to test. For example, CREMAS process. In the same TRA file.

2. Check the Select All checkbox then click the OK button, in the window that appears.

3. Click the Tester tab, in the Test panel.

4. Click the Start testing viewed process button.

5. Click the Start Selected button, in the Process Selection window that appears, the CREMAS Process processes is selected by default. The process is now in Test mode. Any change to the input XML file starts the process.

6. Click the Step to next activity button to step through the process, once the Process Starter is highlighted (indicating a process has started).

7. Click the Stop Testing button to return to design mode.

Use the following steps to test the process.

To run each example:

1. To send DEBMAS01 IDoc, you need to send a vendor master record using ALE/IDoc messaging and SAP transaction BD14.

2. To send DEBMAS01 IDoc, you need to send a customer master record using ALE/IDoc messaging and SAP transaction BD12.

3. To send CREMAS01 IDoc, you need to send a vendor master record using ALE/IDoc messaging and SAP transaction BD10.

Once a message is received by the Publication Service, the message is rendered and written to an output file.

Page 40: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

28 | Working with Publication Service and Remote TIDManager

Expected Results

The example results can be viewed in the respective XML files written to TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\OutboundIDocWithRemoteTIDManager

CREMAS Process Vendor master data is saved to an XML file using data that is forwarded by the Publication Service from the SAP system. An XML file CREMAS.xml is created with the IDoc number as part of the filename.

DEBMAS Process Customer master data is saved to an XML file using data that is forwarded by the Publication Service from the SAP system. An XML file DEBMAS.xml is created with the IDoc number as part of the filename.

MATMAS Process Material master data is saved to an XML file using data that is forwarded by the Publication Service from the SAP system. An XML file MATMAS.xml is created with the IDoc number as part of the filename.

Page 41: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| 29

Chapter 5 Working with Request-Response Invocation Service and Request-Response Service

The example illustrates how the Request-Response Invocation and Request-Response Service of TIBCO ActiveMatrix Adapter for SAP can be used in a TIBCO ActiveMatrix Business Works process.

Topics

• Description of Example, page 30

• Configuration of Example, page 31

• Running the Example, page 33

• Expected Results, page 34

Page 42: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

30 | Working with Request-Response Invocation Service and Request-Response Service

Description of Example

The example illustrates how the Request-Response Invocation and Request-Response Service of the adapter can be used in a TIBCO ActiveWorks BusinessWorks process. The example has two processes, Using JMS and Using RV. The activities performed in both processes are the same. The only difference is the Using JMS process uses the JMS transport protocol and Using RV process uses the Rendezvous transport protocol.

The Using JMS or Using RV process receives an event from SAP using function module BAPI_XBP_EVENT_RAISE. The Request-Response Invocation Service in the adapter forwards the event to the Request-Response Service in the process.

If the EVENTID in the incoming event is CUSTOMER then the corresponding EVENTPARAM would be used to check if the customer number supplied is valid in the SAP system using module BAPI_CUSTOMER_GETDETAIL2. If there is an error then the error would be sent on the reply back to the originating Request-Response Invocation Service. If the customer can be found in the SAP system then information on the customer would be saved to an output XML file.

If the EVENTID in the incoming event is VENDOR then the corresponding EVENTPARAM would be used to check if the customer number supplied is valid in the SAP system using functional module BAPI_VENDOR_GETDETAIL. If there is an error then the error would be sent on the reply back to the originating Request-Response Invocation Service. If the customer can be found in the SAP system then information on the customer would be saved to an output XML file.

If the EVENTID in the incoming event does not match CUSTEOMER and VENDOR, then an error would be sent back to the originating Request-Response Service.

Use the appropriate TIBCO ActiveWorks BusinessWorks process suited for your TIBCO environment.

Page 43: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Configuration of Example | 31

Configuration of Example

Use the following steps to set up the example.

• Task A Set Up JMS or RV, page 31

• Task B Start EMS Server, page 32

Task A Set Up JMS or RVUse the following steps to set up JMS or RV.

In TIBCO Designer:

1. Click the New empty project button and save the project as OutboundRFCWithInboundBAPI, in the initial dialog box.

2. Click Project > Import Full Project button.

3. Click the Zip Archive tab and browse to locate the OutboundRFCWithInboundBAPI file. The file is located in the following folder TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\OutboundRFCWithInboundBAPI

4. Check the checkboxes for

— Replace existing global variables with those in import, and

— Overwrite on name conflict,

in the Import - Options dialog.

5. Select OutboundRFCWithInboundBAPI in the Project panel.

Page 44: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

32 | Working with Request-Response Invocation Service and Request-Response Service

6. Enter values for the following global variables:

— AppServer

— Client

— Password

— SystemNumber

— UserName

— GatewayHost

— GatewayService

— ProgramID

— JMSProviderUrl

— ASAP_HOME (Home directory of the adapter, TIBCO_HOME\tibco\adapter\adr3\version_number)

7. Expand the Project > Export Full Project > Local Repository directory and specify values for Project Name and Dir Name for the dat file.

8. Modify the repourl parameter in adr3.tra under TIBCO_HOME\tibco\adapter\adr3\version_number\bin folder to point to the dat file specified in step 7.

9. Modify the configurl parameter to reflect R3AdapterConfiguration, in the same TRA file.

10. Save the project.

11. Run the adapter from the command line as follows:

adr3-propFile <adapter_home>\bin\adr3.tra

Task B Start EMS ServerIf using the Use JMS process then ensure that the TIBCO Enterprise Message Service server is running and accessible to the machine on which the adapter is installed before running any of the processes.

Page 45: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

Running the Example | 33

Running the Example

Use the following steps to run the example.

In TIBCO Designer:

1. Select the process you want to test. For example, Use JMS Process, from the Project panel.

2. Check the Select All checkbox then click the OK button, in the window that appears.

3. Click the Tester tab, in the Test panel.

4. Click the Start testing viewed process button.

5. Click the Start Selected button, in the Process Selection window that appears, the Use JMS process is selected by default. The process is now in Test mode.

6. Click the Step to next activity button to step through the process, once the Process Starter is highlighted (indicating a process has started).

7. Click the Stop Testing button to return to design mode.

Use the following steps to test the process.

To run each example:

1. Log in to the SAP system

2. Execute the SAP transaction SE37

3. Enter function module BAPI_XBP_EVENT_RAISE and execute the function module.

4. Enter the RFC Destination based on the configuration supplied in the TIBCO Designer project.

5. To test the path of validating a customer master record, enter CUSTOMER as the EVENTID and enter a customer number as the EVENTPARAM.

6. To test the path of validating a vendor master record, enter VENDOR as the EVENTID and enter a vendor number as the EVENTPARAM.

7. To test the path of an invalid event, enter a value for EVENTID that is neither CUSTOMER nor VENDOR.

Page 46: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

34 | Working with Request-Response Invocation Service and Request-Response Service

Expected Results

If EVENTID is VENDOR and the vendor can be found in the SAP system then a success message is returned back to the SAP system and an XML file Vendor.xml is written to:

TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\OutboundRFCWithInboundBAPI

If the vendor cannot be found in the SAP system then an error message is returned back to the SAP system.

If EVENTID is CUTOMER and the customer can be found in the SAP system then a success message is returned back to the SAP system and an XML file Customer.xml is written to:

TIBCO_HOME\tibco\adapter\adr3\version_number\examples\BusinessWorks\OutboundRFCWithInboundBAPI

If the customer cannot be found in the SAP system then an error message is returned back to the SAP system.

If EVENTID is neither VENDOR nor CUSTOMER, then an error message is returned back to the SAP system.

Page 47: TIBCOActiveMatrix Adapterfor SAP Examples · This website is the SAP Help Portal wh ere you can find documentation on all SAP products, including SAP ECC 6.0 re leases and SAP NetWeaver

TIBCO ActiveMatrix Adapter for SAP Examples

| 35

Index

D

documentationthird-party viiiTIBCO ActiveMatrix Adapter for SAP viTIBCO products vi

dynamic logon 7

E

ENV_NAME ixexample

configuration 9, 17, 25, 31description 8, 16, 24, 30prerequisites 3procedure 12, 19, 27, 33results 14, 21, 28, 34

P

Publication Service 23

R

Request-Response Invocation Service 29Request-Response Service 15, 29

S

Subscription Service 15

T

TIB_ADR3_HOME ixTIBCO support

contacting xiiTIBCO documentation xiiTIBCOmmunity xii

TIBCO_HOME ixTIDManager 23