Sei sulla pagina 1di 57

TIBCO ActiveMatrix Adapter for

SAP
Examples
Software Release 7.1
November 2014

Two-Second Advantage
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 Binding Type for
Adapter, TIBCO ActiveMatrix BusinessWorks, TIBCO ActiveMatrix Implementation Type for TIBCO Adapters,
TIBCO ActiveMatrix Service Bus, TIBCO ActiveMatrix Service Grid, 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-2014 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
| iii

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
TIBCO ActiveMatrix Adapter for SAP Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Other TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Third-Party Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Connecting with TIBCO Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
How to Join TIBCOmmunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
How to Access TIBCO Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
How to Contact TIBCO Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii

Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Examples Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
BusinessWorks 5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
BusinessWorks 6 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Prerequisites of Running Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Required Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Importing the Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Starting 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


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 Outbound IDoc in IDocFormat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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


|v

Preface

TIBCO ActiveMatrix Adapter for SAP is 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 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


vi
| Related Documentation

Related Documentation

This section lists documentation resources you may find useful.

TIBCO ActiveMatrix Adapter for SAP Documentation


The 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 Framework Documentation Read this
documentation for instructions on how to install, configure and deploy the
adapter in TIBCO ActiveMatrix BusinessWorks 6.

Other TIBCO Product Documentation


You may find it useful to read the documentation for the following TIBCO
products:

Table 1 TIBCO Products (Sheet 1 of 3)

TIBCO Product Description


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

TIBCO ActiveMatrix Adapter for SAP Examples


Preface vii
|

Table 1 TIBCO Products (Sheet 2 of 3)

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 Framework This product provides a visual, model-driven development
environment for configuring supported TIBCO adapters in
TIBCO Business Studio.

TIBCO ActiveMatrix Implementation Type This product provides capabilities to upload and deploy
for TIBCO Adapters 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 ActiveMatrix Adapter for SAP Examples


viii
| Related Documentation

Table 1 TIBCO Products (Sheet 3 of 3)

TIBCO Product Description



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.

Third-Party Documentation
You 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.

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 products are installed into an installation environment. A product
TIBCO_HOME 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


x
| Typographical Conventions

Table 2 General Typographical Conventions (Contd)

Convention Use
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.

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}

TIBCO ActiveMatrix Adapter for SAP Examples


xii
| Connecting with TIBCO Resources

Connecting with TIBCO Resources

How to Join TIBCOmmunity


TIBCOmmunity 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 Documentation


You can access TIBCO documentation here:
https://docs.tibco.com

How to Contact TIBCO Support


For 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


|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


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
BusinessWorks 5 examples are in the BusinessWorks5 folder. And the
BusinessWorks 6 examples are in the BusinessWorks6 folder.

BusinessWorks 5 Examples
You 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 and the
Request-Response Service in TIBCO Designer.
Outbound IDoc with Remote TIDManager
This example shows how to use the remote TIDmanager and how to use the
Publication Service in multiple adapter instances in TIBCO Designer.
Outbound RFC with Inbound BAPI
This example shows how to use the Request-Response Invocation Service and
the Request-Response Service in TIBCO Designer.
Outbound IDoc in IDocFormat
This example shows how to publish IDocs in the IDocFormat publish mode
and pass control fields of IDoc as JMS properties in TIBCO Designer.
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


Examples Overview 3
|

BusinessWorks 6 Example
You 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


4
| Introduction

Prerequisites of Running Examples

Before running the examples, you need to install the required software, import the
examples and start the 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 Software
You need to install the following software to run the 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 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

For the BusinessWorks 5 example, the version of TIBCO ActiveMatrix


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

Importing the Examples


Based on the platform in which you run the examples, choose one of the
following ways to import the examples:
Importing Examples to TIBCO Designer, page 5
Importing the Example to TIBCO Business Studio, page 5

TIBCO ActiveMatrix Adapter for SAP Examples


Prerequisites of Running Examples 5
|

Importing Examples to TIBCO Designer


This procedure is specific to the 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. Click OK.
6. Click Project > Import Full Project.
7. 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.
8. In the Import - Options window, click Replace existing global variables with
those in import and Overwrite on name conflict. Click Apply.
9. 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 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.
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.

TIBCO ActiveMatrix Adapter for SAP Examples


6
| Introduction

The selected example is displayed in TIBCO Business Studio.

Starting the EMS Server


All of the examples use 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 starting the adapters.
To start the EMS server, click Start > All Programs > TIBCO > TIBCO EMS
[version_number] > Start EMS Server.

TIBCO ActiveMatrix Adapter for SAP Examples


|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


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 Request-Response 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_CREATEFROMDAT 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_CREATEFROMDAT 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


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


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


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


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


| 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


14
| Inbound IDoc with Inbound BAPI

Example Overview

The InboundIDocWithInboundBAPI example shows how to use the Subscription


Service and the Request-Response Service.
This example contains the Vendor process.
Once you update the VendorInputFile.xml file, the Vendor process is triggered.
The Request-Response 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
CREMAS04 IDoc, the CREMAS04 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


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

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.

Ensure that the TIDmanager clients in all the adapter instances match the TID
manager server in the TIDManager, when you select the Remote 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.

TIBCO ActiveMatrix Adapter for SAP Examples


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.

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

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.

TIBCO ActiveMatrix Adapter for SAP Examples


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


18
| Inbound IDoc with Inbound BAPI

TIBCO ActiveMatrix Adapter for SAP Examples


| 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


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 in multiple adapter
instances.
This example contains the following three processes:
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.

TIBCO ActiveMatrix Adapter for SAP Examples


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

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


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


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


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


| 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


26
| Outbound RFC with Inbound BAPI

Example Overview

The OutboundRFCWithInboundBAPI example shows how to use the


Request-Response Invocation Service and the Request-Response 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 forwards this event to the
Request-Response 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 receives an error
message.

TIBCO ActiveMatrix Adapter for SAP Examples


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

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


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


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


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


| 31

Chapter 6 Outbound IDoc in IDocFormat

This chapter describes how to configure and run the OutboundIDocInIDocFormat


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


32
| Outbound IDoc in IDocFormat

Example Overview

The OutboundIDocInIDocFormat example shows how to send IDocs in the


IDocFormat publish mode and pass control fields of IDoc as JMS properties.
This example contains two processes, CREMA04_PROC and MATMAS05_PROC.
The configurations of these two processes are the same except for the IDoc type.
The processes are triggered when the Publication Service publishes an IDoc. The
adapter passes the control fields of IDocs as JMS properties. You can check the
control fields in the JMS Application Properties activity.
When the Subscription Service receives this IDoc which the Publication Service
publishes, the WAIT_FOR_MSG_PROC process is triggered to wait for the IDoc
confirmation message report originated by this Subscription Service.

TIBCO ActiveMatrix Adapter for SAP Examples


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 OutboundIDocInIDocFormat 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.1.

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


34
| Outbound IDoc in IDocFormat

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, click Load Selected.
4. Log on to the SAP system and publish a MATMAS05 IDoc or a CREMAS04
IDoc.
The process is automatically triggered.

TIBCO ActiveMatrix Adapter for SAP Examples


Expected Results 35
|

Expected Results

You can view the example results in the


TIBCO_ADR3_HOME\examples\BusinessWorks5\OutboundIDocInIDocFormat
directory.
If no error occurs and the IDoc type is MATMAS05 or CREMAS04, the IDoc
number and other related information are written to the matmas05_success.txt
file or the cremas04_success.txt file.
If an error occurs during the delivery, the error information is written to the
idoc_exception.txt file.

TIBCO ActiveMatrix Adapter for SAP Examples


36
| Outbound IDoc in IDocFormat

TIBCO ActiveMatrix Adapter for SAP Examples


| 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


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.

In theBusinessWorks 6 example,the OrderDeliveryProcess process is named as


UpdateOpportunityFromSAPDelivery.

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

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

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 DESADV IDoc
containing the Opportunity ID. This process updates the Opportunity object
in Salesforce.com with the SAP delivery number as the tracking number.

TIBCO ActiveMatrix Adapter for SAP Examples


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

4. Click OK.

TIBCO ActiveMatrix Adapter for SAP Examples


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


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


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 DESADV 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 DESADV 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


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


44
| Salesforce Opportunity to SAP Order

Expected Results

You can view the results of the 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 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


| 45

Index

D
documentation
third-party viii
TIBCO ActiveMatrix Adapter for SAP vi
TIBCO products vi
dynamic logon 7

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

T
TIB_ADR3_HOME ix
TIBCO support
contacting xii
TIBCO documentation xii
TIBCOmmunity xii
TIBCO_HOME ix

TIBCO ActiveMatrix Adapter for SAP Examples

Potrebbero piacerti anche