TIBCO ActiveMatrix Adapter for SAP Installation

57
TIBCO ActiveMatrix ® Adapter for SAP Examples Software Release 7.2 February 2016 Two-Second Advantage ®

Transcript of TIBCO ActiveMatrix Adapter for SAP Installation

Page 1: TIBCO ActiveMatrix Adapter for SAP Installation

Two-Second Adv

TIBCO ActiveMatrix® Adapter for SAP

ExamplesSoftware Release 7.2February 2016

antage®

Page 2: TIBCO ActiveMatrix Adapter for SAP Installation

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE) OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE BOUND BY THE SAME.This document contains confidential information that is subject to U.S. and international copyright laws and treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO Software Inc.TIBCO, Two-Second Advantage, TIBCO ActiveMatrix Adapter for SAP, TIBCO ActiveMatrix BusinessWorks, TIBCO ActiveMatrix Service Bus, TIBCO Adapter SDK, TIBCO Administrator, TIBCO Business Studio, TIBCO Designer, TIBCO Enterprise Message Service, TIBCO Hawk, TIBCO Rendezvous, and TIBCO Runtime Agent are either registered trademarks or trademarks of TIBCO Software 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 Corporation in the U.S. and other countries.All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only.THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM.THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 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 BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.Copyright © 1999-2016 TIBCO Software Inc. All rights reserved.TIBCO Software Inc. Confidential Information

Page 3: TIBCO ActiveMatrix Adapter for SAP Installation

| iii

Contents

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

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

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

Examples Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2BusinessWorks 5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2BusinessWorks 6 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Prerequisites of Running Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Required Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Importing the Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Starting the EMS Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Chapter 2 Dynamic Logon and External Commit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

Example Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Configuring the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Chapter 3 Inbound IDoc with Inbound BAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13

Example Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Configuring the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Chapter 4 Outbound IDoc with Remote TIDManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19

Example Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

TIBCO ActiveMatrix Adapter for SAP Examples

Page 4: TIBCO ActiveMatrix Adapter for SAP Installation

iv |

Configuring the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Chapter 5 Outbound RFC with Inbound BAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Example Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Configuring the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Chapter 6 IDocFormat Publishing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Example Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Configuring the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Chapter 7 Salesforce Opportunity to SAP Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Example Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Configuring the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

TIBCO ActiveMatrix Adapter for SAP Examples

Page 5: TIBCO ActiveMatrix Adapter for SAP Installation

| v

Preface

TIBCO ActiveMatrix® Adapter for SAP is a bidirectional 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 manual explains how to run packaged examples in TIBCO Designer™.

Topics

• Related Documentation, page vi

• Typographical Conventions, page ix

• Connecting with TIBCO Resources, page xii

TIBCO ActiveMatrix Adapter for SAP Examples

Page 6: TIBCO ActiveMatrix Adapter for SAP Installation

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 this release notes for a list of new and changed features. This document also contains lists of known issues and closed issues for this release.

• TIBCO ActiveMatrix® Adapter for SAP (TIBCO Business Studio™) Documentation Read this documentation for instructions on how to install, configure and deploy the adapter in TIBCO ActiveMatrix BusinessWorks™ 6.

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

Table 1 TIBCO Products (Sheet 1 of 2)

TIBCO Product Description

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

TIBCO ActiveMatrix Adapter for SAP Examples

Page 7: TIBCO ActiveMatrix Adapter for SAP Installation

Preface | vii

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,

TIBCO ActiveMatrix Adapter for SAP (TIBCO Business Studio)

This product provides a design-time environment to configure adapter configurations and TIDManager configurations in TIBCO Business Studio™.

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 (Sheet 2 of 2)

TIBCO Product Description

TIBCO ActiveMatrix Adapter for SAP Examples

Page 8: TIBCO ActiveMatrix Adapter for SAP Installation

viii | Related Documentation

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.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 9: TIBCO ActiveMatrix Adapter for SAP Installation

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].

TIBCO ActiveMatrix Adapter for SAP Examples

Page 10: TIBCO ActiveMatrix Adapter for SAP Installation

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

TIBCO ActiveMatrix Adapter for SAP Examples

Page 11: TIBCO ActiveMatrix Adapter for SAP Installation

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}

TIBCO ActiveMatrix Adapter for SAP Examples

Page 12: TIBCO ActiveMatrix Adapter for SAP Installation

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 DocumentationDocumentation for this and other TIBCO products is available on the TIBCO Documentation site:

https://docs.tibco.com

Documentation on the TIBCO Documentation site is updated more frequently than any documentation that might be included with the product. To ensure that you are accessing the latest available help topics, please visit us at

https://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.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 13: TIBCO ActiveMatrix Adapter for SAP Installation

| 1

Chapter 1 Introduction

This chapter describes the example projects packaged with TIBCO ActiveMatrix Adapter for SAP and preparation you need to do before running the sample projects.

Topics

• Examples Overview, page 2

• Prerequisites of Running Examples, page 4

TIBCO ActiveMatrix Adapter for SAP Examples

Page 14: TIBCO ActiveMatrix Adapter for SAP Installation

2 | Introduction

Examples Overview

TIBCO ActiveMatrix Adapter for SAP provides seven examples to show how the adapter interacts with the SAP system.

After installing TIBCO ActiveMatrix Adapter for SAP, navigate to the TIBCO_ADR3_HOME\examples directory. You can find two example folders. The ActiveMatrix BusinessWorks 5 examples are in the BusinessWorks5 folder. And the ActiveMatrix BusinessWorks 6 examples are in the BusinessWorks6 folder.

BusinessWorks 5 ExamplesYou can find the following examples in the BusinessWorks5 folder:

• Dynamic Logon and External Commit

This example shows how to use the dynamic logon and the Inbound BAPI transaction support features provided by the adapter in TIBCO Designer.

• Inbound IDoc with Inbound BAPI

This example shows how to use the Subscription Service service and Request-Response Service service in TIBCO Designer.

• Outbound IDoc with Remote TIDManager

This example shows how to use the remote TIDManager instance and how to use the Publication Service service in multiple adapter instances in TIBCO Designer.

• Outbound RFC with Inbound BAPI

This example shows how to use the Request-Response Invocation Service service and Request-Response Service service in TIBCO Designer.

• IDocFormat Publishing Mode

This example shows how to use the adapter for sending and receiving IDocs without any significant mapping, and the usage of JMS properties for the Publication Service service and the IDoc confirmation.

• Salesforce

— Salesforce Opportunity to SAP Order

This example shows how to set up communication between the SAP system and Salesforce.com by using the adapter in TIBCO Designer.

Before running these examples, you need to import the example projects into TIBCO Designer. See Importing Examples to TIBCO Designer on page 5.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 15: TIBCO ActiveMatrix Adapter for SAP Installation

Examples Overview | 3

BusinessWorks 6 ExampleYou can find the following example in the BusinessWorks6 folder:

• Saleforce

— Salesforce Opportunity to SAP Order

This example shows how to set up communication between the SAP system and Salesforce.com by using the adapter in TIBCO Business Studio.

Before running this example, you need to import the example project into TIBCO Business Studio. See Importing the Example to TIBCO Business Studio on page 5.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 16: TIBCO ActiveMatrix Adapter for SAP Installation

4 | Introduction

Prerequisites of Running Examples

Before running the examples, you need to install the required software, import the examples and start the TIBCO Enterprise Message Service (EMS) server.

For the required software, see Required Software on page 4.

For how to import examples and start the EMS server, see Importing the Examples on page 4 and Starting the EMS Server on page 6.

Required SoftwareYou need to install the following software to run the ActiveMatrix BusinessWorks 5 examples:

• TIBCO ActiveMatrix Adapter for SAP

• TIBCO ActiveMatrix BusinessWorks 5.x

• TIBCO Runtime Agent

• TIBCO ActiveMatrix BusinessWorks™ Plug-in for Salesforce.com

You need to install the following software to run the ActiveMatrix BusinessWorks 6 example:

• TIBCO ActiveMatrix Adapter for SAP

• TIBCO ActiveMatrix BusinessWorks 6.x

• TIBCO ActiveMatrix Adapter Framework

• TIBCO Runtime Agent

• TIBCO ActiveMatrix BusinessWorks Plug-in for Salesforce.com

Importing the ExamplesBased on the platform in which you run the examples, choose one of the following ways to import the examples:

For the ActiveMatrix BusinessWorks 5 example, the version of TIBCO ActiveMatrix BusinessWorks Plug-in for Salesforce.com must be 2.4.1 or later.

For the ActiveMatrix BusinessWorks 6 example, the version of TIBCO ActiveMatrix BusinessWorks Plug-in for Salesforce.com must be 6.0.1 or later. See Readme file of TIBCO ActiveMatrix Adapter for SAP (TIBCO Business Studio) for the details about the supported versions of the products.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 17: TIBCO ActiveMatrix Adapter for SAP Installation

Prerequisites of Running Examples | 5

• Importing Examples to TIBCO Designer, page 5

• Importing the Example to TIBCO Business Studio, page 5

Importing Examples to TIBCO Designer

This procedure is specific to the ActiveMatrix BusinessWorks 5 examples in the BusinessWorks5 folder.

To import an example to TIBCO Designer:

1. Open TIBCO Designer.

2. In the startup window, click New empty project.

3. In the Save Project window, click next to the Project Directory field to select a directory for the new project and specify a name for it.

4. Select UTF-8 from the TIBCO Messaging Encoding list.

5. (Optional) Select one option from the Multi-User System list and specify the applicable values according to your system setting.

6. Click OK.

7. Click Project > Import Full Project.

8. In the Import Project window, click the ZIP Archive tab and click to locate the example to be imported. Click OK.

The examples are located in the TIBCO_ADR3_HOME\examples\BusinessWorks5 directory.

9. In the Import - Options window, click Replace existing global variables with those in import and Overwrite on name conflict. Click Apply.

10. Click Save to save the project.

The selected example is displayed in TIBCO Designer.

Importing the Example to TIBCO Business Studio

This procedure is specific to the ActiveMatrix BusinessWorks 6 example in the BusinessWorks6 folder.

To import an example to TIBCO Business Studio:

1. Open TIBCO Business Studio.

2. Click File > Import.

3. In the Import window, expand the General folder and select the Existing Studio Projects into Workspace item. Click Next.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 18: TIBCO ActiveMatrix Adapter for SAP Installation

6 | Introduction

4. In the Import Projects window, click Select archive file. Then click Browse next to the Select archive file field to locate the example to be imported.

The example is located in the TIBCO_ADR3_HOME\examples\BusinessWorks6\Salesforce directory.

5. Click Finish.

The selected example is displayed in TIBCO Business Studio.

Starting the EMS ServerAll of the examples use the JMS transport type. Ensure that the EMS server is running and accessible to the machine on which the adapter is installed before starting the adapter.

To start the EMS server, click Start > All Programs > TIBCO > TIBCO EMS [version_number] > Start EMS Server.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 19: TIBCO ActiveMatrix Adapter for SAP Installation

| 7

Chapter 2 Dynamic Logon and External Commit

This chapter describes how to configure and run the DynamicLogonExternalCommit example in TIBCO Designer.

Topics

• Example Overview, page 8

• Configuring the Example, page 9

• Running the Example, page 11

• Expected Results, page 12

TIBCO ActiveMatrix Adapter for SAP Examples

Page 20: TIBCO ActiveMatrix Adapter for SAP Installation

8 | Dynamic Logon and External Commit

Example Overview

The DynamicLogonExternalCommit example shows how to use the dynamic logon and the Inbound BAPI transaction support features provided by the adapter. This example contains two processes, Create SalesOrder and Create SaleOrder with Auto Commit.

Both of the processes are configured with the Request-Response Service services. When running the processes, the adapter creates a dynamic connection to create sales orders in the SAP system.

The adapter packages the Create_SalesOrder_Send_Template.xml file in the TIBCO_ADR3_HOME\examples\BusinessWorks5\DynamicLogonExternalCommit directory. The Create_SalesOrder_Send_Template.xml file contains the input data of these two processes.

The adapter invokes the BAPI_SALESORDER_CREATEFROMDAT1 function module to create a sales order in the SAP system based on the input data in the Create_SalesOrder_Send_Template.xml file.

If an error occurs when the adapter invokes the BAPI_SALESORDER_CREATEFROMDAT1 function module, the error is written to the OrderStatus.xml file.

However, these two processes use different function models and mechanisms to commit and roll back a sales order in the SAP system:

• In the Create SalesOrder process, if the adapter fails to create a sales order, the adapter invokes the BAPI_TRANSACTION_ROLLBACK function module to roll back the sales order.

Otherwise, the adapter invokes the BAPI_TRANSACTION_COMMIT function module to commit the created sales order.

• In the Create SaleOrder with Auto Commit process, if the adapter fails to create a sales order, the sales order is automatically rolled back without the invocation of any function module.

Otherwise, the BAPI_TRANSACTION_COMMIT function module is automatically invoked to commit the created sales order.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 21: TIBCO ActiveMatrix Adapter for SAP Installation

Configuring the Example | 9

Configuring the Example

After importing the example to TIBCO Designer, as described in Importing Examples to TIBCO Designer on page 5, you need to ensure that the adapter can access to the SAP system before running the process.

To set up a connection between the adapter and the SAP system:

1. In TIBCO Designer, open the DynamicLogonExternalCommit example project.

2. In the Global Variables panel, click . The Global Variables editor is displayed.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 22: TIBCO ActiveMatrix Adapter for SAP Installation

10 | Dynamic Logon and External Commit

3. 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\SNC_bSSO

— UDConnection\SNC_ssoSend

— UDConnection\SNC_x509

— UDConnection\SystemName

— UDConnection\SystemNumber

— UDConnection\UserName

— JMSProviderUrl

— ASAP_HOME

ASAP_HOME is the home directory where you install the adapter. For example, E:\TIBCO_HOME\adapter\adr3\7.2.

4. Click OK.

5. In the Project panel, click the adapter instance, and then, in the Configuration panel, click the Design-Time Connection tab.

6. Click Test Connection to validate your connection.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 23: TIBCO ActiveMatrix Adapter for SAP Installation

Running the Example | 11

Running the Example

Ensure that you have configured the example, as described in Configuring the Example on page 9.

To run the example, complete the following tasks:

• Task A, Start the Adapter, page 11

• Task B, Run the Process, page 11

Task A Start the Adapter

The adapter must be running before you run the example.

To start the adapter:

1. In TIBCO Designer, click Tools > Show Adapter Tester.

2. In the Adapter Tester window, click the adapter instance in the left panel.

3. In the Run Settings tab in the right panel, specify the directory where you run the processes and the executable file.

4. Click Start to start the adapter.

Task B Run the Process

After starting the adapter, complete the following steps to run the process:

1. In the Project panel, click the process that you want to run.

2. In the Tester panel, click to load the process.

3. In the Select Process to Load window, click Load Selected.

4. Navigate to the TIBCO_ADR3_HOME\examples\BusinessWorks5\

DynamicLogonExternalCommit directory and update the Create_SalesOrder_Send_Template.xml file.

The process is automatically triggered.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 24: TIBCO ActiveMatrix Adapter for SAP Installation

12 | Dynamic Logon and External Commit

Expected Results

You can view the example results in the TIBCO_ADR3_HOME\examples\BusinessWorks5\

DynamicLogonWithExternalCommit directory.

When the process is finished, all the results of creating a sales order are written to the output file named OrderStatus.xml. If the creation is successful, you can also check the sales order information in the SAP system.

You can also check the symbolic destination of the active connection in the SAP server or check the adapter log file to get the dynamic connection result.

The log file is located in the TIBCO_ADR3_HOME\logs directory.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 25: TIBCO ActiveMatrix Adapter for SAP Installation

| 13

Chapter 3 Inbound IDoc with Inbound BAPI

This chapter describes how to configure and run the InboundIDocWithInboundBAPI example in TIBCO Designer.

Topics

• Example Overview, page 14

• Configuring the Example, page 15

• Running the Example, page 16

• Expected Results, page 17

TIBCO ActiveMatrix Adapter for SAP Examples

Page 26: TIBCO ActiveMatrix Adapter for SAP Installation

14 | Inbound IDoc with Inbound BAPI

Example Overview

The InboundIDocWithInboundBAPI example shows how to use the Subscription Service service and the Request-Response Service service.

This example contains the Vendor process.

Once you update the VendorInputFile.xml file, the Vendor process is triggered. The Request-Response Service service invokes the BAPI_GL_ACC_EXISTENCECHECK functional module to validate the G/L account in the VendorInputFile.xml file.

You can find the VendorInputFile.xml file in the TIBCO_ADR3_HOME\examples\BusinessWorks5\InboundIDocWithInboundBAPI directory.

If the G/L account in the VendorInputFile.xml file is valid, the Vendor process publishes a message to the adapter to create a vender based on the information in the VendorInputFile.xml file. Once the adapter receives the message as a CREMAS05 IDoc, the CREMAS05 IDoc is used to create a vendor in the SAP system.

If the G/L account is invalid, an error message is written to the output file.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 27: TIBCO ActiveMatrix Adapter for SAP Installation

Configuring the Example | 15

Configuring the Example

After importing the example to TIBCO Designer, as described in Importing Examples to TIBCO Designer on page 5, you need to ensure that the adapter can access the SAP system before running the process.

To set up a connection between the adapter and the SAP system:

1. In TIBCO Designer, open the InboundIDocWithInboundBAPI example project.

2. In the Global Variables panel, click . The Global Variables editor is displayed.

3. Enter values for the following global variables:

— AppServer

— Client

— GatewayService

— Password

— SystemNumber

— UserName

— JMSProviderUrl

— ASAP_HOME

ASAP_HOME is the home directory where you install the adapter. For example, E:\TIBCO_HOME\adapter\adr3\7.2.

4. Click OK.

5. (Optional) Change the Inbound TID management mode:

a. In the Project panel, click the R3AdapterConfiguration adapter instance.

b. In the Configuration panel, click the Adapter Services tab.

c. Change the TID management mode.

6. In the Project panel, click the adapter instance, and then, in the Configuration panel, click the Design-Time Connection tab.

7. Click Test Connection to validate your connection.

Ensure that the TIDmanager clients in all the adapter instances match the TID manager server in the TIDManager instance, when you select the Remote TID management mode.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 28: TIBCO ActiveMatrix Adapter for SAP Installation

16 | Inbound IDoc with Inbound BAPI

Running the Example

Ensure that you have configured the example, as described in Configuring the Example on page 15.

To run the example, complete the following tasks:

• Task A, Start the Adapter, page 16

• Task B, Run the Process, page 16

Task A Start the Adapter

The adapter must be running before you run the example.

To start the adapter:

1. In TIBCO Designer, click Tools > Show Adapter Tester.

2. In the Adapter Tester window, click the adapter instance in the left panel.

3. In the Run Settings tab in the right panel, specify the directory where the processes run and the executable file.

4. Click Start to start the adapter.

Task B Run the Process

After starting the adapter, complete the following steps to run the process:

1. In the Project panel, click the Vendor process.

2. In the Tester panel, click to load the process.

3. In the Select Process to Load window, click Load Selected.

4. Navigate to the TIBCO_ADR3_HOME\examples\BusinessWorks5\

InboundIDocWithInboundBAPI directory and update the VendorInputFile.xml file.

The process is automatically triggered.

If you have configured the adapter instance with the remote Inbound TIDManagement, before start the adapter, first start the TIDManager.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 29: TIBCO ActiveMatrix Adapter for SAP Installation

Expected Results | 17

Expected Results

You can view the example results in the TIBCO_ADR3_HOME\examples\BusinessWorks5\InboundIDocWithInboundBAPI directory.

If the G/L account is valid, a vendor is created in the SAP system. You can check the vendor information in the SAP system.

If the G/L account is invalid, the error is written to the error.xml file.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 30: TIBCO ActiveMatrix Adapter for SAP Installation

18 | Inbound IDoc with Inbound BAPI

TIBCO ActiveMatrix Adapter for SAP Examples

Page 31: TIBCO ActiveMatrix Adapter for SAP Installation

| 19

Chapter 4 Outbound IDoc with Remote TIDManager

This chapter describes how to configure and run the OutboundIDocWithRemoteTIDManager example in TIBCO Designer.

Topics

• Example Overview, page 20

• Configuring the Example, page 21

• Running the Example, page 22

• Expected Results, page 24

TIBCO ActiveMatrix Adapter for SAP Examples

Page 32: TIBCO ActiveMatrix Adapter for SAP Installation

20 | Outbound IDoc with Remote TIDManager

Example Overview

The OutboundIDocWithRemoteTIDManagerexample shows how to use the remote TID manager and how to use the Publication Service services in multiple adapter instances.

This example contains the following three processes:

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

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

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

TIBCO ActiveMatrix Adapter for SAP Examples

Page 33: TIBCO ActiveMatrix Adapter for SAP Installation

Configuring the Example | 21

Configuring the Example

After importing the example to TIBCO Designer, as described in Importing Examples to TIBCO Designer on page 5, you need to ensure that the adapter can access the SAP system before running the process.

To set up a connection between the adapter and the SAP system:

1. In TIBCO Designer, open the OutboundIDocWithRemoteTIDManager example project.

2. In the Global Variables panel, click . The Global Variable editor is displayed.

3. Enter values for the following global variables:

— AppServer

— Client

— GatewayService

— Password

— SystemNumber

— UserName

— JMSProviderUrl

— ASAP_HOME

ASAP_HOME is the home directory where you install the adapter. For example, E:\TIBCO_HOME\adapter\adr3\7.2.

4. Click OK.

5. In the Project panel, click the adapter instance, and then, in the Configuration panel, click the Design-Time Connection tab.

6. Click Test Connection to validate your connection.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 34: TIBCO ActiveMatrix Adapter for SAP Installation

22 | Outbound IDoc with Remote TIDManager

Running the Example

Ensure that you have configured the example, as described in Configuring the Example on page 21.

To run the example, complete the following tasks:

• Task A, Start the Adapter and TIDManager, page 22

• Task B, Run the Process, page 22

Task A Start the Adapter and TIDManager

The TIDManager and the adapter must be running before you run the example.

To start the TIDManager and the adapter:

1. In TIBCO Designer, click Tools > Show Adapter Tester.

2. In the Adapter Tester window, click the TIDManager instance in the left panel.

3. In the Run Settings tab in the right panel, specify the directory where the processes run and the executable file.

4. Click Start to start the TIDManager instance.

5. In the left panel, click the adapter instance.

6. In the Run Settings tab in the right panel, specify the directory where the processes run and the executable file.

7. Click Start to start the adapter.

Task B Run the Process

After starting the adapter and TID manager, complete the following steps to run the process:

1. In the Project panel, click the process which you want to test.

2. In the Tester panel, click to load the process.

3. In the Select Process to Load window, click Load Selected.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 35: TIBCO ActiveMatrix Adapter for SAP Installation

Running the Example | 23

4. Log on to the SAP system and send an IDoc to start the process:

— To start the MATMAS process:

Send a MATMAS01 IDoc using ALE/IDoc messaging and execute the SAP transaction BD10.

— To start the DEBMAS process:

Send a DEBMAS01 IDoc using ALE/IDoc messaging and execute the SAP transaction BD12.

— To start the CREMAS process:

Send a CREMAS01 IDoc using ALE/IDoc messaging and execute the SAP transaction BD14.

The process is triggered automatically.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 36: TIBCO ActiveMatrix Adapter for SAP Installation

24 | Outbound IDoc with Remote TIDManager

Expected Results

You can find the example results in the TIBCO_ADR3_HOME\examples\BusinessWorks5\

OutboundIDocWithRemoteTIDManager directory:

• The CREMAS_IDocNumber.xml file that contains the Vendor Master Data is created, when the CREMAS process completed.

• The DEBMAS_IDocNumber.xml file that contains the Customer Master Data is created, when the DEBMAS process completed.

• The MATMAS_IDocNumber.xml file that contains the Material Master Data is created, when the MATMAS process is completed.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 37: TIBCO ActiveMatrix Adapter for SAP Installation

| 25

Chapter 5 Outbound RFC with Inbound BAPI

This chapter describes how to configure and run the OutboundRFCWithInboundBAPI example in TIBCO Designer.

Topics

• Example Overview, page 26

• Configuring the Example, page 27

• Running the Example, page 28

• Expected Results, page 30

TIBCO ActiveMatrix Adapter for SAP Examples

Page 38: TIBCO ActiveMatrix Adapter for SAP Installation

26 | Outbound RFC with Inbound BAPI

Example Overview

The OutboundRFCWithInboundBAPI example shows how to use the Request-Response Invocation Service service and the Request-Response Service service.

This example contains two processes. The only difference between the two processes is that the Using JMS process uses the JMS transport but the Using RV process uses the Rendezvous transport.

The Using JMS and the Using RV processes receive an event from the SAP system by invoking the BAPI_XBP_EVENT_RAISE function module. The Request-Response Invocation Service service forwards this event to the Request-Response Service service.

• When the value of the EVENTID parameter in the incoming event is CUSTOMER, the adapter invokes the BAPI_CUSTOMER_GETDETAIL2 function module to check if the customer number provided for the EVENTPARAM parameter is valid.

If the customer number is valid, the process writes the customer information to an output file. Otherwise, the Request-Response Invocation Service receives an error message.

• When the value of the EVENTID parameter in the incoming event is VENDOR, the adapter invokes the BAPI_VENDOR_GETDETAIL function module to check if the customer number provided for the EVENTPARAM parameter is valid.

If the customer number is valid, the process writes the customer information to an output file. Otherwise, the Request-Response Invocation Service receives an error message.

When the value of the EVENTID parameter in the incoming event is neither CUSTOMER nor VENDOR, the Request-Response Invocation Service service receives an error message.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 39: TIBCO ActiveMatrix Adapter for SAP Installation

Configuring the Example | 27

Configuring the Example

After importing the example to TIBCO Designer, as described in Importing Examples to TIBCO Designer on page 5, you need to ensure that the adapter can access to the SAP system before running the process.

To set up a connection between the adapter and the SAP system:

1. In TIBCO Designer, open the OutboundRFCWithInboundBAPI example project.

2. In the Global Variables panel, click . The Global Variables editor is displayed.

3. Enter values for the following global variables:

— AppServer

— GatewayHost

— ProgramID

— Client

— GatewayService

— Password

— SystemNumber

— UserName

— JMSProviderUrl

— ASAP_HOME

ASAP_HOME is the home directory where you install the adapter. For example, E:\TIBCO_HOME\adapter\adr3\7.2.

4. Click OK.

5. In the Project panel, click the adapter instance, and then, in the Configuration panel, click the Design-Time Connection tab.

6. Click Test Connection to validate your connection.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 40: TIBCO ActiveMatrix Adapter for SAP Installation

28 | Outbound RFC with Inbound BAPI

Running the Example

Ensure that you have configured the example, as described in Configuring the Example on page 27.

To run the example, complete the following tasks:

• Task A, Start the Adapter, page 28

• Task B, Run the Process, page 28

Task A Start the Adapter

The adapter must be running before you run the example.

To start the adapter:

1. In TIBCO Designer, click Tools > Show Adapter Tester.

2. In the Adapter Tester window, click the adapter instance in the left panel.

3. In the Run Settings tab in the right panel, specify the directory where the processes are run and the executable file.

4. Click Start to start the adapter.

Task B Run the Process

After starting the adapter, complete the following steps to run the process:

1. In the Project panel, click the process which you want to test.

2. In the Tester panel, click to load the process.

3. In the Select Process to Load window, click Load Selected.

4. Log on to the SAP system and execute the SAP transaction SE37.

5. Execute the BAPI_XBP_EVENT_RAISE the function module.

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

TIBCO ActiveMatrix Adapter for SAP Examples

Page 41: TIBCO ActiveMatrix Adapter for SAP Installation

Running the Example | 29

7. Configure the customer and vendor information according to events to be tested:

a. To validate a customer master record, set the EVENTID parameter to CUSTOMER and enter a customer number for the EVENTPARAM parameter.

b. To validate a vendor master record, set the EVENTID parameter to VENDOR and enter a vendor number for the EVENTPARAM parameter.

c. To test an invalid event, enter a value for the EVENTID parameter that is neither CUSTOMER nor VENDOR.

The process is automatically triggered.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 42: TIBCO ActiveMatrix Adapter for SAP Installation

30 | Outbound RFC with Inbound BAPI

Expected Results

You can view the example results in the TIBCO_ADR3_HOME\examples\BusinessWorks5\OutboundRFCWithInboundBAPI directory:

• The vendor.xml is created when the value of the EVENTID parameter is VENDOR.

• The customer.xml is created when the value of the EVENTID parameter is CUSTOMER.

• The SAP system receives an error message when the value of the EVENTID parameter is neither VENDOR nor CUSTOMER.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 43: TIBCO ActiveMatrix Adapter for SAP Installation

| 31

Chapter 6 IDocFormat Publishing Mode

This chapter describes how to configure and run the IDocFormatPublishingMode example in TIBCO Designer.

Topics

• Example Overview, page 32

• Configuring the Example, page 33

• Running the Example, page 34

• Expected Results, page 35

TIBCO ActiveMatrix Adapter for SAP Examples

Page 44: TIBCO ActiveMatrix Adapter for SAP Installation

32 | IDocFormat Publishing Mode

Example Overview

The IDocFormatPublishingMode example shows how to use the adapter for sending and receiving IDocs without any significant mapping. This is useful in cases where there are systems or applications that understand the SAP IDoc format. In addition to demonstrating the usage of the IDocFormat publish mode, this example also shows the usage of JMS properties for the Publication Service service and the IDoc confirmation for the Subscription Service service.

This example contains four processes, ReceiveIDocFromSAP, SendCREMASToSAP, SendDEBMASToSAP, WaitIDocConfirmation.

The configurations of the SendCREMASToSAP and SendDEBMASToSAP processes are the same except for the IDoc type.

The ReceiveIDocFromSAP process is triggered when the Publication Service service publishes an IDoc from the SAP system. After the IDoc is received, it is written to the .idoc file. The adapter passes the control fields of IDocs as JMS properties. You can check the control fields in the JMS Application Properties resource.

Then, the SendCREMASToSAP or SendDEBMASToSAP process is triggered. The received IDoc is published back to the SAP system.

Finally, the WaitIDocConfirmation process is triggered to wait for the IDoc confirmation message report after the Subscription Service service receives the IDoc.

The SAPIDOC_MESTYP property has been defined in the JMS Application Properties resource. You can also define the JMS properties that you want in this resource.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 45: TIBCO ActiveMatrix Adapter for SAP Installation

Configuring the Example | 33

Configuring the Example

After importing the example to TIBCO Designer, as described in Importing Examples to TIBCO Designer on page 5, ensure that the adapter can access to the SAP system before running the process.

To set up a connection between the adapter and the SAP system:

1. In TIBCO Designer, open the IDocFormatPublishingMode example project.

2. In the Global Variables panel, click . The Global Variables editor is displayed.

3. Enter values for the following global variables:

— AppServer

— Client

— GatewayHost

— GatewayService

— Password

— ProgramID

— SystemNumber

— UserName

— ASAP_HOME

ASAP_HOME is the home directory where you install the adapter. For example, E:\TIBCO_HOME\adapter\adr3\7.2.

4. Click OK.

5. In the Project panel, click the adapter instance, and then, in the Configuration panel, click the Design-Time Connection tab.

6. Click Test Connection to validate your connection.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 46: TIBCO ActiveMatrix Adapter for SAP Installation

34 | IDocFormat Publishing Mode

Running the Example

Ensure that you have configured the example, as described in Configuring the Example on page 33.

To run the example, complete the following tasks:

• Task A, Start the Adapter, page 34

• Task B, Run the Process, page 34

Task A Start the Adapter

The adapter must be running before you run the example.

To start the adapter:

1. In TIBCO Designer, click Tools > Show Adapter Tester.

2. In the Adapter Tester window, click the adapter instance in the left panel.

3. In the Run Settings tab in the right panel, specify the directory where you run the processes and the executable file.

4. Click Start to start the adapter.

Task B Run the Process

After starting the adapter, complete the following steps to run the process:

1. In the Project panel, click the process that you want to run.

2. In the Tester panel, click to load the process.

3. In the Select Process to Load window, select all the displayed processes except the WaitIDocConfirmation process.

4. Click Load Selected.

5. Log on to the SAP system and publish a CREMAS01 IDoc or a DEBMAS01 IDoc.

The processes are automatically triggered.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 47: TIBCO ActiveMatrix Adapter for SAP Installation

Expected Results | 35

Expected Results

You can view the example results in the TIBCO_ADR3_HOME\examples\BusinessWorks5\IDocFormatPublishingMode directory.

When the IDoc confirmation report message from the SAP system is received, the message is written to the idoc_confirmation.txt file.

The IDoc published from the SAP system is also written to the debmas.idoc or cremas.idoc file.

Figure 1 debmas.idoc File Example

TIBCO ActiveMatrix Adapter for SAP Examples

Page 48: TIBCO ActiveMatrix Adapter for SAP Installation

36 | IDocFormat Publishing Mode

TIBCO ActiveMatrix Adapter for SAP Examples

Page 49: TIBCO ActiveMatrix Adapter for SAP Installation

| 37

Chapter 7 Salesforce Opportunity to SAP Order

This chapter describes how to configure and run the SalesforceOpportunityToSAPOrder example in TIBCO Designer and TIBCO Business Studio.

Topics

• Example Overview, page 38

• Configuring the Example, page 39

• Running the Example, page 41

• Expected Results, page 44

TIBCO ActiveMatrix Adapter for SAP Examples

Page 50: TIBCO ActiveMatrix Adapter for SAP Installation

38 | Salesforce Opportunity to SAP Order

Example Overview

The SalesforceOpportunityToSAPOrder example shows how to set up communication between the SAP system and Salesforce.com by using the adapter. The example contains two processes, SyncOpportunityProcess and OrderDeliveryProcess.

• SyncOpportunityProcess process

The workflow action is triggered to send outbound messages to the process when you create a record of the Opportunity object with the stage of Closed Won or edit a record of the Opportunity object by setting the stage to Closed Won in the Salesforce.com.

The adapter invokes the BAPI_SALESORDER_CREATEFROMDAT1 function module to create a sales order in the SAP system based on the outbound messages. When an error occurs in the invocation, this error is written to the OrderStatus.xml file.

If the adapter fails to create the sales order, the adapter invokes the BAPI_TRANSACTION_ROLLBACK function module to roll back the sales order.

Otherwise, the adapter invokes BAPI_TRANSACTION_COMMIT function module to commit the created sales order. Then update the opportunity object in the Salesforce.com with the sales order number.

• OrderDeliveryProcess process

This process is triggered when the adapter publishes a DESADV05 IDoc containing the Opportunity ID. This process updates the Opportunity object in Salesforce.com with the SAP delivery number as the tracking number.

In the ActiveMatrix BusinessWorks 6 example,the OrderDeliveryProcess process is named as UpdateOpportunityFromSAPDelivery.

In the ActiveMatrix BusinessWorks 6 example, there is no output for the invocation error.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 51: TIBCO ActiveMatrix Adapter for SAP Installation

Configuring the Example | 39

Configuring the Example

After importing the example to TIBCO Designer or TIBCO Business Studio, as described in Importing the Examples on page 4, you need to ensure that the adapter can access the SAP system before running the process.

Based on the platform in which you run the example, choose one of the following ways to set up a connection between the adapter and the SAP system before you run the process:

• Set Up a Connection in TIBCO Designer, page 39

• Set Up a Connection in TIBCO Business Studio, page 40

Set Up a Connection in TIBCO Designer

1. In TIBCO Designer, open the SalesforceOpportunityToSAPOrder example project.

2. In the Global Variables panel, click . The Global Variables editor is displayed.

3. Enter values for the following global variables:

— AppServer

— Client

— GatewayHost

— Password

— ProgramID

— SystemNumber

— UserName

— GatewayService

— Salesforce.connection\salesforce.password

— Salesforce.connection\salesforce.username

— Salesforce.connection\serverURL

— ASAP_HOME

ASAP_HOME is the home directory where you install the adapter. For example, E:\TIBCO_HOME\adapter\adr3\7.2.

4. Click OK.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 52: TIBCO ActiveMatrix Adapter for SAP Installation

40 | Salesforce Opportunity to SAP Order

5. In the Project panel, click the adapter instance, and then, in the Configuration panel, click the Design-Time Connection tab.

6. Click Test Connection to validate your connection.

Set Up a Connection in TIBCO Business Studio

1. In TIBCO Business Studio, open the SalesforceOpportunityToSAPOrder example project.

2. In the Project Explorer view, expand the Module Description resource and double-click the Module Properties item.The Module Properties editor is displayed.

3. Enter values for the following properties:— SAPAppServer

— SAPClient

— SAPGatewayHost

— SAPPassword

— SAPProgramID

— SAPSystemNumber

— SAPUserName

— SAPOrderFile

— SAPGatewayService

— salesforce_password

— salesforce_username

4. Click Save.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 53: TIBCO ActiveMatrix Adapter for SAP Installation

Running the Example | 41

Running the Example

Ensure that you have configured the example, as described in Configuring the Example on page 39.

To run the example, complete the following tasks:

• Task A, Start the Adapter, page 41

• Task B, Run the Process, page 42

Task A Start the Adapter

The adapter must be running before you run this example.

Based on the platform in which you run the example, choose one of the following ways to start the adapter:

• Start the Adapter in TIBCO Designer, page 41

• Start the Adapter in TIBCO Business Studio, page 41

Start the Adapter in TIBCO Designer

1. In TIBCO Designer, click Tools > Show Adapter Tester.

2. In the Adapter Tester window, click the adapter instance in the left panel.

3. In the Run Settings tab in the right panel, specify the directory where you run the processes and the executable file.

4. Click Start to start the adapter.

Start the Adapter in TIBCO Business Studio

1. In TIBCO Business Studio, click Run > Run Configuration.

2. In the Run Configuration window, double-click the Adapter Launcher item to create a configuration to start the adapter. The Adapter Configuration tab is displayed in the right panel.

3. Click Browse next to the Adapter Configuration field to select the adapter you want to start.

4. In the Adapter Configuration selection dialog, expand the salesforce_opportunity_to_sap_orderProject directory and click the R3AdapterConfiguration.model adapter. Click OK.

5. Click Apply, and then click Run to start the adapter.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 54: TIBCO ActiveMatrix Adapter for SAP Installation

42 | Salesforce Opportunity to SAP Order

Task B Run the Process

Based on the platform in which you run the example, choose one of the following ways to run the process:

• Run the Process in TIBCO Designer, page 42

• Run the Process in TIBCO Business Studio, page 42

Run the Process in TIBCO Designer

1. In the Project panel, click the process which you want to test, and then click the Tester panel.

2. In the Tester panel, click to load the process.

3. In the Select Process to Load window, click Load Selected.

4. To start the process, do one of the following tasks:

— SyncOpportunityProcess process

Create a record of the a Opportunity object with the stage of Closed Won or edit a record of the a Opportunity object by setting the stage to Closed Won.

— OrderDeliveryProcess process

Publish a DESADV05 IDoc, after creating a delivery of a sales order in the SAP system. You can create the delivery in the SAP system either by executing SAP transaction VL01N and referencing the sales order or by executing the SAP Delivery Due List report.

Run the Process in TIBCO Business Studio

1. In TIBCO Business Studio, click Run > Run Configuration.

2. In the Run Configuration window, double-click the BusinessWorks Application item to create a configuration to run the process. The Application tab is displayed in the right panel.

3. Click Apply, and then click Run.

4. To start the process, do one of the following tasks:

— SyncOpportunityProcess process

Create a record of the a Opportunity object with the stage of Closed Won or edit a record of the a Opportunity object by setting the stage to Closed Won.

— OrderDeliveryProcess process

Publish a DESADV05 IDoc, after creating a delivery of a sales order in the SAP system. You can create the delivery in the SAP system either by

TIBCO ActiveMatrix Adapter for SAP Examples

Page 55: TIBCO ActiveMatrix Adapter for SAP Installation

Running the Example | 43

executing SAP transaction VL01N and referencing the sales order or by executing the SAP Delivery Due List report.

The process is automatically triggered.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 56: TIBCO ActiveMatrix Adapter for SAP Installation

44 | Salesforce Opportunity to SAP Order

Expected Results

You can view the results of the ActiveMatrix BusinessWorks 5 example in the TIBCO_ADR3_HOME\examples\BusinessWorks5\Salesforce\

SalesforceOpportunityToSAPOrder directory:

When the SyncOpportunityProcess process is finished, all the results of creating a sales order are written to the OrderStatus.xml file. If the creation is successful, you can also update the Salesforce.com to check the sales order number.

When the OrderDeliveryProcess process is finished, the sales order information is written to the DOCNUM.xml file. You can update the Salesforce.com to check the tracking number.

For the ActiveMatrix BusinessWorks 6 example, there is no ouput file. You can update Salesforce.com to check the sales order number or the the tracking number, when the processes are finished.

TIBCO ActiveMatrix Adapter for SAP Examples

Page 57: TIBCO ActiveMatrix Adapter for SAP Installation

TIBCO ActiveMatrix Adapter for SAP Examples

| 45

Index

D

documentationthird-party viiTIBCO ActiveMatrix Adapter for SAP viTIBCO products vi

dynamic logon 7

E

ENV_NAME ixexample

configuration 9, 15, 21, 27description 8, 14, 20, 26prerequisites 4procedure 11, 16, 22, 28results 12, 17, 24, 30

T

TIB_ADR3_HOME ixTIBCO support

contacting xiiTIBCO documentation xiiTIBCOmmunity xii

TIBCO_HOME ix