tib adsap ex
TRANSCRIPT
-
7/29/2019 Tib Adsap Ex
1/126
TIBCO ActiveMatrix Adapter
for SAP
ExamplesSoftware Release 6.0February 2009
-
7/29/2019 Tib Adsap Ex
2/126
Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDEDOR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITEDADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLEDSOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FORANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF ALICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSEAGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USERLICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THESOFTWARE (AND WHICH IS DUPLICATED IN LICENSE.PDF) OR IF THERE IS NO SUCH SOFTWARELICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATEDIN THE LICENSE FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMSAND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND ANAGREEMENT TO BE BOUND BY THE SAME.
This document contains confidential information that is subject to U.S. and international copyright laws andtreaties. No part of this document may be reproduced in any form without the written authorization of TIBCOSoftware Inc.
TIB, TIBCO, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, TIBCO ActiveMatrixBusinessWorks, TIBCO Rendezvous, TIBCO Administrator, TIBCO Designer, TIBCO Runtime Agent, TIBCOHawk, TIBCO Enterprise Message Service, TIBCO Designer Add-in for TIBCO Business Studio, TIBCO
ActiveMatrix Service Grid, TIBCO ActiveMatrix Service Bus, TIBCO ActiveMatrix BusinessWorks ServiceEngine, and TIBCO Business Studio are either registered trademarks or trademarks of TIBCO Software Inc. inthe United States and/or other countries.
EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of SunMicrosystems, Inc. in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of theirrespective owners and are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALLOPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAMETIME. SEE THE README.TXT 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 ORIMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS.CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BEINCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKEIMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED INTHIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY ORINDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDINGBUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright 1999-2009 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
-
7/29/2019 Tib Adsap Ex
3/126
TIBCO ActiveMatrix Adapter for SAP Examples
| iii
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
TIBCO ActiveMatrix Adapter for SAP Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Other TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Third Party Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Terminology and Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
How to Contact TIBCO Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Business Object Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Using TIBCO ActiveMatrix BusinessWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Working with dat files in TIBCO Designer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Creating a Database Table in the SAP System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Creating RFC Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Testing the Function Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Creating Outbound and Inbound Instances Using TIBCO Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Creating an Outbound Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Creating an Inbound Instance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Chapter 2 TIBCO ActiveMatrix BusinessWorks: Working with the Customer Business Object .
31
Example Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Deploy and Run the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Chapter 3 TIBCO ActiveMatrix BusinessWorks: Working with the SalesOrder Business Object
39
Example Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Test the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/ -
7/29/2019 Tib Adsap Ex
4/126
TIBCO ActiveMatrix Adapter for SAP Examples
iv | Contents
Chapter 4 TIBCO ActiveMatrix BusinessWorks: Working with the PurchaseOrder Business
Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Test the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Chapter 5 TIBCO ActiveMatrix BusinessWorks: Working with the Employee Business Object
55
Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Test the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Chapter 6 TIBCO ActiveMatrix BusinessWorks: Working with the ItemMaster Business Object
61
Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Test the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Chapter 7 TIBCO ActiveMatrix BusinessWorks: BDC Example. . . . . . . . . . . . . . . . . . . . . . . . . 69
Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Test the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Chapter 8 TIBCO ActiveMatrix BusinessWorks: Dynamic Logon for RFC . . . . . . . . . . . . . . . . 77
Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Test the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Chapter 9 TIBCO ActiveMatrix BusinessWorks: Integration of External Commit with the Adapt-er using BAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Test the Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Chapter 10 TIBCO ActiveMatrix BusinessWorks: Data Caching using RFC . . . . . . . . . . . . . . 89Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/ -
7/29/2019 Tib Adsap Ex
5/126
TIBCO ActiveMatrix Adapter for SAP Examples
Contents |v
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Test the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Chapter 11 TIBCO ActiveMatrix BusinessWorks: IDoc Filtering . . . . . . . . . . . . . . . . . . . . . . . . 95
Example Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Test the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Chapter 12 TIBCO ActiveMatrix BusinessWorks: IDoc Reporting . . . . . . . . . . . . . . . . . . . . . 103
Example Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Configuring Subscription Services for IDoc Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Setup the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Test the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/http://tib_adsap_ex.pdf/ -
7/29/2019 Tib Adsap Ex
6/126
TIBCO ActiveMatrix Adapter for SAP Examples
vi | Contents
-
7/29/2019 Tib Adsap Ex
7/126
TIBCO ActiveMatrix Adapter for SAP Examples
|vii
Preface
This guide includes examples that demonstrate how the adapter interacts withTIBCO ActiveMatrix BusinessWorks.
Topics
Related Documentation, page viii
Terminology and Acronyms, page xii
How to Contact TIBCO Customer Support, page xiv
-
7/29/2019 Tib Adsap Ex
8/126
TIBCO ActiveMatrix Adapter for SAP Examples
viii | Preface
Related Documentation
This section lists documentation resources.
TIBCO ActiveMatrix Adapter for SAP Documentation
The following documents form the TIBCO ActiveMatrix Adapter for SAPdocumentation set:
TIBCO ActiveMatrix Adapter for SAP Concepts Read this manual before reading
any other book in the documentation set. This book describes the adapter,adapter features, and the applications that the adapter interacts with.
TIBCO ActiveMatrix Adapter for SAP Installation Read this manual to learn howto install TIBCO ActiveMatrix Adapter for SAP.
TIBCO ActiveMatrix Adapter for SAP Configuration and Deployment This manualexplains how to create and configure standalone adapter projects. Informationon deploying adapter projects is also included.
TIBCO ActiveMatrix Adapter for SAP Examples This manual providesinstructions to run the examples that demonstrate use of the adapter.
TIBCO ActiveMatrix Adapter for SAP Release Notes Read this document forinformation about new features, deprecated features, and open and closedissues.
Other TIBCO Product Documentation
You may find it useful to read the documentation for the following TIBCOproducts.
TIBCO Designer
TIBCO Administrator
TIBCO ActiveMatrix BusinessWorks
TIBCO Rendezvous
TIBCO Enterprise Message Service
TIBCO Hawk
TIBCO Adapter SDK
TIBCO Runtime Agent
-
7/29/2019 Tib Adsap Ex
9/126
TIBCO ActiveMatrix Adapter for SAP Examples
Related Documentation | ix
Third Party Documentation
SAP R/3: Implementation Guide by Bradley D. Hiquet, available fromKelly-Lacey & Associates Inc. This is A Managers Guide to UnderstandingSAP that emphasizes the users point of view. Printed in 1998 by MacmillanTechnological Publishing.
SAP R/3 Business Blueprint by Thomas Curran and Gerhard Keller. Printed in1998 by Prentice Hall PTR.
SAP R/3 System, A Client/Server Technologyby Rudiger Buck-Emden. This is ageneral technical overview that is easy to read. Printed in 1996 byAddison-Wesley.
-
7/29/2019 Tib Adsap Ex
10/126
TIBCO ActiveMatrix Adapter for SAP Examples
x | Preface
Typographical Conventions
The following typographical conventions are used in this manual
Table 1 General Typographical Conventions
Convention Use
TIBCO_HOME
ENV_HOME
Many TIBCO products must be installed within the same home directory. Thisdirectory is referenced in documentation as TIBCO_HOME. The value ofTIBCO_HOME depends on the operating system. For example, on Windows
systems, the default value is C:\tibco.
Other TIBCO products are installed into an installation environment.Incompatible products and multiple instances of the same product are installedinto different installation environments. The directory into which such productsare installed is referenced in documentation as ENV_HOME. The value ofENV_HOME depends on the operating system. For example, on Windowssystems the default value is C:\tibco.
code font Code font identifies commands, code examples, filenames, pathnames, andoutput displayed in a command window. For example:
Use MyCommand to start the foo process.
bold code
fontBold 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 ofparticular interest.
In command syntax, to indicate the default parameter for a command. Forexample, if no parameter is specified, MyCommand is enabled:MyCommand [enable | disable]
italic font Italic font is used in the following ways:
To indicate a document title. For example: See TIBCO BusinessWorks 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: MyCommandpathname
-
7/29/2019 Tib Adsap Ex
11/126
TIBCO ActiveMatrix Adapter for SAP Examples
Typographical Conventions |xi
Keycombinations
Key name separated by a plus sign indicate keys pressed simultaneously. Forexample: Ctrl+C.
Key names separated by a comma and space indicate keys pressed one after theother. For example: Esc, Ctrl+Q.
The note icon indicates information that is of special interest or importance, forexample, an additional action required only in certain circumstances.
The tip icon indicates an idea that could be useful, for example, a way to applythe 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 1 General Typographical Conventions (Contd)
Convention Use
-
7/29/2019 Tib Adsap Ex
12/126
TIBCO ActiveMatrix Adapter for SAP Examples
xii | Preface
Terminology and Acronyms
Term Definition
ABAP Advanced Business Application Programming is a language in SAP used towrite SAP specific code.
ALE/IDoc Application Link Enabling/Intermediate Documents.
API Application Program Interface.
Application Server The server on which the SAP processes run.BAPI Business API (Functionally equivalent to RFC).
CIF Certified Intermediate Format.
Component A self-contained replaceable functional unit of the adapter that provides a setof interfaces. TIBCO ActiveMatrix Adapter for SAP has two kinds ofcomponents; r3Outbound and r3Inbound. r3Outbound encapsulates
functionality for outbound communication with the SAP system whiler3Inbound encapsulates the functionality for inbound communication withthe SAP system.
EDI Electronic Data Interchange.
EMS Enterprise Message Service
Gateway Server A server used to exchange data with the SAP system.
Inbound Instance An adapter configuration listening for messages inbound to the SAP system.Inbound instances transfer messages from the TIBCO environment to SAP.
Interface A functional sub-unit of the adapter that exposes one or more adapterservices. For example, the RFCServer interface exposes RFC/BAPIRequest-Response Invocation services.
JMS JAVA Messaging Service
MBCS Multi-byte character string.
One WayInvocation protocol
One way invocation protocol allows you to invoke the BAPI/RFC in the SAPsystem without waiting for a reply from the system.
Outbound Instance An adapter configuration listening for messages outbound from SAP.
Outbound instances transfer messages from SAP to the TIBCO environment.
-
7/29/2019 Tib Adsap Ex
13/126
TIBCO ActiveMatrix Adapter for SAP Examples
Terminology and Acronyms |xiii
RV TIBCO Rendezvous protocol; also in certain contexts refers to reliable
message quality of service, as opposed to certified message.RFC The SAP Remote Function Call Interface.
RFC Client A SAP term for any program that can post RFCs/BAPIs/IDocs from anexternal system into the SAP system.
RVCM TIBCO Rendezvous certified message quality of service.
RFC Server A SAP term for any external program that can accept and processRFCs/BAPIs/IDocs from the SAP system.
RVDQ TIBCO Rendezvous distributed queue.
SAP Native data All SAP data that the adapter interacts with. It consists of RFC data types.This includes IDocs received as RFC tables in an RFC function call.
SSL Secure Sockets Layer.TID Transaction ID. A globally unique identifier used by transactional RFCs to
ensure exactly-once execution of a transaction.
TIDManager Transaction Identifier Manager.
Term Definition
-
7/29/2019 Tib Adsap Ex
14/126
TIBCO ActiveMatrix Adapter for SAP Examples
xiv | Preface
How to Contact TIBCO Customer Support
For comments or problems with this manual or the software it addresses, pleasecontact TIBCO Support as follows.
For an overview of TIBCO Support, and information about getting startedwith 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 username and password. If you do not have ausername, you can request one.
|1
-
7/29/2019 Tib Adsap Ex
15/126
TIBCO ActiveMatrix Adapter for SAP Examples
|1
Chapter 1 Introduction
This chapter includes procedures and prerequisites that have to be carried outbefore you start running the examples provided with your adapter installation.Detailed information for the examples is provided in subsequent chapters of thisguide.
Topics
Overview, page 2
Creating a Database Table in the SAP System, page 10
Creating RFC Functions, page 15
Testing the Function Modules, page 22
Testing the Function Modules, page 22
Creating Outbound and Inbound Instances Using TIBCO Designer, page 24
Creating an Inbound Instance, page 27
2 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
16/126
TIBCO ActiveMatrix Adapter for SAP Examples
2 | Chapter 1 Introduction
Overview
The examples discussed in this guide demonstrate how TIBCO ActiveMatrixAdapter for SAP interacts with TIBCO ActiveMatrix BusinessWorks. Simplepublish-subscribe or request-response scenarios are used to demonstrate thedifferent interactions.
Business Object Examples
The following business objects are used in the examples to build an end-to-endenterprise wide integration and demonstrate the adapter capabilities:
Customer
SalesOrder
PurchaseOrder
Employee
ItemMaster
The examples provide different operations on each of these business objects:
Get - In this operation, TIBCO ActiveMatrix BusinessWorks requests data tobe fetched from the SAP system. The Request-Response service is used tofetch records from the SAP system. The query is read from an XML file (itcould also be done by a comma separated file or a database). Thecorresponding BAPI is executed on the SAP server and the result is given back
to TIBCO ActiveMatrix BusinessWorks. The results are mapped fromActiveEnterprise to XML format, and written to an XML file. A diagrammaticrepresentation of the Get operation is given next.
Overview |3
-
7/29/2019 Tib Adsap Ex
17/126
TIBCO ActiveMatrix Adapter for SAP Examples
Overview |3
Figure 1 Business Object Operation: Get
Insert - In this operation, TIBCO ActiveMatrix BusinessWorks sends data tothe SAP System to create a record. The Request-Response adapter service isused to send a record and get a response from the SAP system. The recorddetails are read from an XML file. The corresponding BAPI is executed on the
SAP server and the result is given back to TIBCO ActiveMatrixBusinessWorks. The results are then written to an XML file. A diagrammaticrepresentation of the Insert operation is given next:
Figure 2 Business Object Operation: Insert.
Sync - In this operation, the SAP System sends (publishes) data, which isreceived by TIBCO ActiveMatrix BusinessWorks. The Publication service inthe adapter is used to send records from the SAP system in the form of IDocs.
The data is received by TIBCO ActiveMatrix BusinessWorks and written to anXML file. A diagrammatic representation of the Sync operation is given next.
BAPI_CUSTOMER_G
ETDETAIL1
TIBCO Environment
Request for
customer
information
Customer
details
SAP System
TIBCO ActiveMatrixBusinessWorks
TIBCOActiveMatrixAdapter for
SAP
Request XML Response XML
TIBCO Environment
SAP System
Request
to create
Sales
order
Sales
order
number
TIBCO ActiveMatrixBusinessWorks
TIBCOActiveMatrixAdapter for
SAP
BAPI_SALESORDER_
CREATEFROMDAT1
Service
Request XML Response XML
4 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
18/126
TIBCO ActiveMatrix Adapter for SAP Examples
4 | Chapter 1 Introduction
Figure 3 Business Object Operation: Sync
CustomerThis example demonstrates the Get, Create and Sync operations on theCustomer Business Object. Pre-configured TIBCO ActiveMatrix BusinessWorksprocesses are available with the adapter installation to perform these operations.A brief description of these processes is given next.
Get_Customer process fetches customer details from the SAP system andwrites them to a database table. You can write the data in an XML file by
making a small modification in the XML file as explained later in the guide.The Customer Number is read from an XML file containing query details.
Create_Customer creates a new customer in the SAP system. Customerdetails are read from an XML file.
Sync_Customer publishes an IDoc, out of the SAP system whenever a newcustomer is created. TIBCO ActiveMatrix BusinessWorks receives details ofthis customer and includes them in an XML file.
SalesOrder
This example demonstrates the Get, Create and Sync operations on theSalesOrder Business Object. Pre-configured TIBCO ActiveMatrix BusinessWorksprocesses are available with the adapter installation to perform these operations.A brief description of these processes is given next.
Get_SalesOrder
fetches Sales Orders from the SAP system and writes themin an XML file. The CustomerNumber, Material, SalesOrganization
IDoc ORDERS01Publication Service
TIBCO Environment
SAP System
TIBCO
ActiveMatrix
Adapter for SAP
Purchase OrderInformation
TIBCO ActiveMatrix
BusinessWorks
XML file
Overview |5
-
7/29/2019 Tib Adsap Ex
19/126
TIBCO ActiveMatrix Adapter for SAP Examples
|
parameters are read from another XML file. Sales Orders based on theseparameters are retrieved from the SAP system.
Create_SalesOrder creates a Sales Order in the SAP system and writes the
details of the operation in an XML file. The data that needs to be passed tocreate an order in the SAP system is read from another XML file.
Sync_SalesOrder publishes an IDoc, out of the SAP system whenever a newSalesOrder is created. TIBCO ActiveMatrix BusinessWorks receives details ofthis SalesOrder, and includes them in an XML file.
PurchaseOrder
This example demonstrates the Get and Sync operations on the PurchaseOrderBusiness Object. Pre-configured TIBCO ActiveMatrix BusinessWorks processesare available with the adapter installation to perform these operations. A briefdescription of these processes is given next.
Get_PurchaseOrder fetches Purchase Order details from the SAP system andwrites them in an XML File. The Purchase Order Number is read from anotherXML file.
Sync_PurchaseOrder publishes an IDoc, out of the SAP system whenever anew Purchase Order is created or changed. TIBCO ActiveMatrixBusinessWorks receives details of this Purchase Order, and writes them in anXML file.
Employee
This example demonstrates the Get operation on the Employee Business Object.A pre-configured TIBCO ActiveMatrix BusinessWorks process is available withyour adapter installation. A brief description of the process is given next.
Get_Employee gets Employee details from the SAP system, based on parametersstored in an XML file. These details are then written into another XML file.
ItemMaster
This example demonstrates the Get and Sync operations on the ItemMasterBusiness Object. Pre-configured TIBCO ActiveMatrix BusinessWorks processesare available with the adapter installation to perform these operations. A briefdescription of these processes is given next.
Get_ItemMaster Fetches Material details from the SAP system and writesthese to an XML file.
Sync_ItemMaster
Whenever a Material record is created or changed in theSAP system, an IDoc is published. On reception of the notification, TIBCO
6 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
20/126
TIBCO ActiveMatrix Adapter for SAP Examples
|
ActiveMatrix BusinessWorks triggers the SyncItemMaster process. This readsthe published message and writes the Material details in an XML file.
Prerequisites |7
-
7/29/2019 Tib Adsap Ex
21/126
TIBCO ActiveMatrix Adapter for SAP Examples
|
Prerequisites
To try out the examples, you must first set up a custom integration scenario inyour SAP system. Carry out the following steps to set up the integration scenario:
1. Create a database table in the SAP system. See Creating a Database Table inthe SAP System on page 10 for details.
2. Create function modules (BAPIs) to add, delete and modify entries. SeeCreating RFC Functions on page 15 for details.
3. Configure outbound adapters. See Creating an Outbound Instance on page 24for details.
4. Configure inbound adapters. See Creating an Inbound Instance on page 27 fordetails.
Using TIBCO ActiveMatrix BusinessWorks
If you are using the adapter with TIBCO ActiveMatrix BusinessWorks, thefollowing software must be installed to run the examples:
TIBCO ActiveMatrix Adapter for SAP
TIBCO ActiveMatrix BusinessWorks
TIBCO Administrator
SAP System
TIBCO Runtime Agent
Refer to the TIBCO ActiveMatrix Adapter for SAP readme.txt for the supportedversions of the software listed above.
The TIBCO ActiveMatrix BusinessWorks examples use TIBCO Designer to createan Enterprise Archive File (EAR) and TIBCO Administrator to deploy the EARfile.
In TIBCO Administrator, make sure all software components needed by theadapter instance are installed on one or more machines that are part of a TIBCOAdministration Domain and that the software is registered in the domain.
Use the TIBCO Domain Utility to add a machine to a TIBCO AdministrationDomain.
In TIBCO Administrator, use the Resource Management > Machines consoleto register software.
These topics are explained in the TIBCO Administrator documentation set.
8 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
22/126
TIBCO ActiveMatrix Adapter for SAP Examples
|
Location
The files for the examples are in the following location:
TIBCO_HOME\adapter\adr3\\examples\BusinessWorks\,
where is the adapter version number.
Make sure the resources in the examples point to the correct location.
Working with dat files in TIBCO Designer
The dat files included in the adapter installation are used by all examples exceptthe TIBCO ActiveMatrix BusinessWorks examples.
You cannot directly open a dat file in TIBCO Designer and make modifications tothe configurations. To do this, complete the following steps:
Prerequisites |9
-
7/29/2019 Tib Adsap Ex
23/126
TIBCO ActiveMatrix Adapter for SAP Examples
|
1. Convert the dat file to a multi-file project.
a. Open TIBCO Designer. In the first screen that is displayed, clickAdministration. The screen is shown next.
b. Then click the Convert DAT to Files icon. In the window that is displayed,browse and select the dat file you wish to convert to a multi-file project.Click OK.
2. Click the Open existing project icon from the first TIBCO Designer screen.Browse to the directory where the converted multi-file project is saved.
3. Make configuration changes as per your requirements.
4. Export the multi-file project to a dat. Select Project>Export Full Project fromthe menu. Browse and select the location of the directory you wish to save thedat file to. Ensure that the directory is different from the multi-file project.Enter the name of the project and click OK.
10 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
24/126
TIBCO ActiveMatrix Adapter for SAP Examples
Creating a Database Table in the SAP System
To create an employee table in the SAP system ABAP dictionary, you must createa structure in that dictionary. To do this:
1. Start the SAP system.
2. In the logon screen, select Tools>ABAP Workbench>Development>ABAPDictionary. The following screen is displayed.
3. Select the Datatype radio button and type ZMRM_STR in the associated textfield.
4. Click the Create icon.
Creating a Database Table in the SAP System |11
-
7/29/2019 Tib Adsap Ex
25/126
TIBCO ActiveMatrix Adapter for SAP Examples
5. Select the Structure radio button in the Create Type ZMRM_STR pop up andclick the icon.
6. Enter the values NAME and GRP in the Component column.
7. Enter the values CHAR30 and CHAR25 in the Component type column forthe values NAME and GRP.
8. To save the structure click Save. The following screen is displayed.
9. Click Local object to save the ZMRM_STR structure. This will take you backto the previous screen.
10. Click Structure and then click Activate to make this structure available.
12 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
26/126
TIBCO ActiveMatrix Adapter for SAP Examples
11. Click Back to return to the Dictionary Objects browser as shown next.
12. Select the Databasetable radio button and enter the name of the table asZMRM_TABLE.
13. Click the Create icon to create the table.
14. Enter a short description for the object in the Short Descriptionfield, select Cin the Delivery class field and select Display/Maintenance Allowed in theData Browser/Table View Maint. field.
Creating a Database Table in the SAP System |13
-
7/29/2019 Tib Adsap Ex
27/126
TIBCO ActiveMatrix Adapter for SAP Examples
15. Select the Fields tab.
16. Enter the values MANDT, EMPNUM and .INCLUDE in the Fields column.
17. Select the Key check boxes next to MANDT and EMPNUM fields.
18. To save the structure click Save.
19. Click Local object to save the ZMRM_STR structure. This will take you backto the previous screen.
20. Click the Technical Settingsbutton to get the following screen.
14 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
28/126
TIBCO ActiveMatrix Adapter for SAP Examples
21. Select USER in the Data class field, select 0 in the Size Category field andselect the Buffering not allowed radio button in the Buffering section. Saveyour settings.
22. Select Back to return to the previous screen.23. Select Table>Activate to activate the table.
Creating RFC Functions |15
-
7/29/2019 Tib Adsap Ex
29/126
TIBCO ActiveMatrix Adapter for SAP Examples
Creating RFC Functions
Here, we write two simple RFC functions to add and get employee information.1. Start the SAP system. In the logon screen, select
Tools>ABAPWorkbench>Development>SE37-FuncionBuilder to invokeFunction Builder initial screen.
2. Select Goto>Function groups>Create group.
3. Enter ZNEW in the Function group field and a short description of theFunction group in the Short Text field.
16 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
30/126
TIBCO ActiveMatrix Adapter for SAP Examples
4. To save the structure click Save. The following screen is displayed.
5. Click Local object to save the ZMRM_STR structure. This will take you backto the Function Builder initial screen.
6. Enter Z_ADDEMPINFO in the Function module field.
Creating RFC Functions |17
-
7/29/2019 Tib Adsap Ex
31/126
TIBCO ActiveMatrix Adapter for SAP Examples
7. Click Create to create the function module. The following screen is displayed.
8. Enter ZNEW in the Function group field and a short description in the Shorttext field.
9. Click Save. The following screen is displayed.
10. Click the Import tab.
11. Enter SOCNUM and REFSTR in the Parameter name column which refer tothe ZMRM_TABLE's EMPNUM and ZMRM_STR respectively.
18 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
32/126
TIBCO ActiveMatrix Adapter for SAP Examples
12. Click the Exceptions tab.
13. Enter INSERT_FAILEDin theException column. This is the exception the
code uses.14. Click Activate, and then click Save to create the Z_ADDEMPINFO function
module.
15. Click the Source code tab.
16. Enter your custom code. Click Save to save changes.
Creating RFC Functions |19
-
7/29/2019 Tib Adsap Ex
33/126
TIBCO ActiveMatrix Adapter for SAP Examples
17. Click Back to return to the Function Builder initial screen, and then enter thevalue Z_GETEMPINFO in the Function module field and click the Createicon to create the second function module.
18. Click the Import tab. In the Import parameter column enter SOCNUM andREFSTR, which refer to the ZMRM_TABLE's EMPNUM and ZMRM_STR respectively.The following screen shows the Import parameters.
20 | Chapter 1 Introduction
-
7/29/2019 Tib Adsap Ex
34/126
TIBCO ActiveMatrix Adapter for SAP Examples
19. Click the Export tab. Enter theExport parameter in the first column. Enter thecorresponding Reference Field/Structure. The following screen shows theexport parameters.
20. Click the Tables tab. Enter theTable parameter in the first column. Enter thecorresponding Reference Structure. The following screen shows the Tableparameters.
Creating RFC Functions |21
21 Cli k h E i b D fi h i h ill b i i h
-
7/29/2019 Tib Adsap Ex
35/126
TIBCO ActiveMatrix Adapter for SAP Examples
21. Click the Exceptions tab. Define the exception that you will be using in thecode. The following screen shows an example.
22. Click Activate to activate the Function module and then click Save to save.
23. Click the Source Code icon to display the following screen.
24. Enter your custom code as shown and click Save.
22 | Chapter 1 Introduction
T ti th F ti M d l
-
7/29/2019 Tib Adsap Ex
36/126
TIBCO ActiveMatrix Adapter for SAP Examples
Testing the Function Modules
1. To test whether the function modules, which you have created earlier in theprevious sections are working correctly, go to Function Builder initial screen.
2. Enter the name of the Function Module and selectFunctionModule>Test>SingleTest. The following Test Function Moduleinitial screen is displayed.
3. Enter the values SOCNUM and REFSTR in the Import parameters column.
Testing the Function Modules |23
4 Click the EXECUTE icon The following screen is displayed
-
7/29/2019 Tib Adsap Ex
37/126
TIBCO ActiveMatrix Adapter for SAP Examples
4. Click the EXECUTE icon. The following screen is displayed.
5. If you try to add the same employee details twice, the following exception isdisplayed:
6. Test the other function modules similarly.
24 | Chapter 1 Introduction
Creating Outbound and Inbound Instances Using TIBCO Designer
-
7/29/2019 Tib Adsap Ex
38/126
TIBCO ActiveMatrix Adapter for SAP Examples
Creating Outbound and Inbound Instances Using TIBCO Designer
This is an end-to-end example that demonstrates the communication between theoutbound and inbound instances of the adapter. Both adapter instances connect tothe SAP system. The outbound and inbound instances are pre-configured. Thesubsequent sections explain how to arrive at these configurations.
Creating an Outbound Instance
Setting up Connection
1. Start TIBCO Designer. (For details refer to the TIBCO Designer User's Guide.)
2. Drag and drop an R/3 Adapter Configuration icon from the R/3 palette panelto the design panel. The folders in the project panel will be created as follows:
R/3 Adapter Configuration
R/3 Connections
3. Set options in the Design-Time Connection tab.
Creating Outbound and Inbound Instances Using TIBCO Designer|25
4. Specify values in the fields. Click Test Connection to test the connection.
-
7/29/2019 Tib Adsap Ex
39/126
TIBCO ActiveMatrix Adapter for SAP Examples
Spec y a ues t e e ds C ck est Co ect o to test t e co ect o
5. Next, click the projects Adapter Services folder. The R/3 Filters tab isdisplayed.
Selecting Schema
1. Click Fetch RFC/BAPIs. The progress bar is displayed, indicating thatinformation is being downloaded from the SAP system. Specify the followingin the RFC/BAPI tab:
In the Name column, select the Z-ADDEMPINFO function from theappropriate group in the list. This is the function that you created earlier to
add employee information.
Select the Used checkbox and click Apply. A service for the RFC is createdautomatically. The RFC/BAPI appears in the design panel.
Selecting a Service
1. Select the adapter service, associate it with the corresponding schema, and
specify information in the Configuration and Advanced tabs. Click Apply tocreate an outbound service.
In the Configuration tab, default values are displayed.
2. In the Advanced tab, specify a Subject. This subject name should be the sameas in the inbound instance.
3. Associate the service with the corresponding schema.
Select the RFC/ABAP functions (Z_GETEMPINFO,Z_DELEMPINFO) createdearlier in the Request-Response mode. See Creating RFC Functions onpage 15 for details on creating these functions.
4. Next, click R3Adapterconfiguration in the project folder. In the Configurationtab, enable Show All Tabs. The Adapter Servicestab is displayed.
5. In the Adapter Servicestab, set the TID Management field to Remote. Thisensures that all the transactional RFC calls occur only once. For details on TID
26 | Chapter 1 Introduction
Manager, see TIBCO ActiveMatrixAdapter for SAP Configuration and
-
7/29/2019 Tib Adsap Ex
40/126
TIBCO ActiveMatrix Adapter for SAP Examples
g p f f gDeployment.
6. Click Apply.
7. In the Configuration tab, select Outbound in the R/3 Connection field.
8. Configure the outbound instance using the Run-time Outboundtab.
9. In the Program ID field, specify the value sapides that you have provided inthe SAP system during configuration of the RFC destination.
10. In the Gateway Service field, specify the SAP gateway service.
11. In the Gateway Host field, specify the gatewayHost name or the IP address orrouter string. If there is no specific machine acting as the gateway host, this isthe same as the appserver.
Creating Outbound and Inbound Instances Using TIBCO Designer|27
12. In the RFC Trace field, indicate whether the trace is on or off. Possible values
-
7/29/2019 Tib Adsap Ex
41/126
TIBCO ActiveMatrix Adapter for SAP Examples
are 0 and 1 only. 0 is the default value. You need not change the defaultsettings.
0 denotes the trace is OFF.1 denotes the trace is ON.
13. Click Apply.
Running the example
Use the properties file to run the outbound adapter instance.
tibco.repourl
TIBCO_HOME\adapter\adr3\\examples\repository\R3Ada
pterExamples_Instance.dat
tibco.configurl
\tibco\private\adapter\SAPAdapter40\R3AdapterConfiguration
Creating an Inbound Instance
To create an inbound instance of the adapter, use the following steps:
Setting up Connection
1. Start TIBCO Designer. For details on the TIBCO Designer, use the Helpoptions in the TIBCO designer GUI or refer the TIBCO Designer User's Guide.
2. Drag and drop an R/3 Adapter Configuration icon from the R/3 palette panelto the design panel. The folders in the project panel will be created as follows:
R/3 Adapter Configuration
R/3 Connections
3. In the Configuration tab, select Inbound from the R/3 Connection Typedrop-down.
Ensure that the design-time adapter is running.
28 | Chapter 1 Introduction
4. Set connection options in the Design-Time Connection tab.
-
7/29/2019 Tib Adsap Ex
42/126
TIBCO ActiveMatrix Adapter for SAP Examples
5. Specify values in fields. Click Test Connection to test the connection.
6. Select the Adapter Services folder, fetch the schema using the Fetch
RFC/BAPIs button.7. Click the RFC/BAPI tab.
8. Select the Function group from the list that is displayed.
9. Select the Used check box against the required schema and click Apply tocreate an inbound service. In this example, select RFC/ABAP functions(Z_GETEMPINFO and Z_DELEMPINFO) created earlier in the Request-Responsemode.
10. Specify details in the Configuration and Advanced tabs.
Creating Outbound and Inbound Instances Using TIBCO Designer|29
11. In the Advanced tab, specify the Subject. The subject name specified in thisi t h ld b th i th tb d i t
-
7/29/2019 Tib Adsap Ex
43/126
TIBCO ActiveMatrix Adapter for SAP Examples
instance should be the same as in the outbound instance.
12. In the Configuration tab, select Inbound in the R/3 Connection field.
13. Configure the inbound instance using the Run-time Inbound tab.
Ensure that the subject name in both Inbound instance and Outboundinstance match for all three RFC functions. This allows the outbound adapterto communicate with the inbound adapter.
30 | Chapter 1 Introduction
14. Settings used in the Design-time Connection tab are populated by defaultin the Run time Inbound tab You can test the connection by clicking Test
-
7/29/2019 Tib Adsap Ex
44/126
TIBCO ActiveMatrix Adapter for SAP Examples
in the Run-time Inbound tab. You can test the connection by clicking TestConnection.
15. Click Apply.
Running the example
Use the properties file to run the inbound adapter instance.
tibco.repourl
TIBCO_HOME\adapter\adr3\\examples\repository\R3Ada
pterExamples_Instance.dat
tibco.configurl
\tibco\private\adapter\SAPAdapter40\R3AdapterConfiguration
|31
Chapter 2 TIBCO ActiveMatrix BusinessWorks:
-
7/29/2019 Tib Adsap Ex
45/126
TIBCO ActiveMatrix Adapter for SAP Examples
Working with the Customer Business
Object
This example shows how to use several adapter services within a TIBCOActiveMatrix BusinessWorks process to create, get and synchronize Customer
details stored in SAP. The example is deployed and run using the TIBCOAdministrator GUI.
This example uses TIBCO Rendezvous as its transport type.
Topics
Example Description, page 32
Setup the Example, page 33
Deploy and Run the Example, page 34
Expected Results, page 37
All files relevant to this example are located in the following location.
\tibco\adapter\adr3\\examples\BusinessWorks\Customer
32 | Chapter 2 TIBCO ActiveMatrix BusinessWorks: Working with the Customer Business Object
Example Description
-
7/29/2019 Tib Adsap Ex
46/126
TIBCO ActiveMatrix Adapter for SAP Examples
This example illustrates how the adapters Subscription and Request-Response
services can be used in a TIBCO ActiveMatrix BusinessWorks process. Theexample has three processes, Create_Customer, Get_Customer andSync_Customer.
Create_Customer uses the adapters Request-Response service to create acustomer record in SAP.
Create_Customer uses the input XML file (containing details about thecustomer to be created) to invoke the Request-Response service and creates acustomer in SAP. It returns a customer number for the customer recordcreated in the SAP system.
Get_Customer uses the adapters Request-Response Service to fetch datafrom SAP for a particular customer. The data is fetched based on the customernumber specified in the input XML file and is written into an output XML file.
Sync_Customer uses the adapters Subscription service to subscribe toupdate or modification messages from SAP whenever Customer details aremodified or updated in the SAP system. On receiving the Customer details,TIBCO ActiveWorks BusinessWorks writes the IDoc to an XML file.
For each of the above TIBCO ActiveMatrix BusinessWorks process, modify thedata in the input XML file corresponding to your SAP system.
Setup the Example |33
Setup the Example
-
7/29/2019 Tib Adsap Ex
47/126
TIBCO ActiveMatrix Adapter for SAP Examples
Before starting the example you must import the sample project zip file and save
it in a new project.
Setup for all the processes:
In TIBCO Designer:
1. In the initial dialog box click Open New Project and specify a name for theproject.
2. Click Project>Import Full Project.
3. Click the Zip Archive tab and browse to locate the Customer.zip file. The fileis located in the following folder
\tibco\adapter\adr3\\examples\BusinessWorks\Customer
4. Save the project as a multi-file project by the name Customer.
5. Select Customer in the project panel.
6. For Create_Customer and Get_Customer processes, click the File Poller icon.In the configuration panel, File Name field, click Browse and select thecorresponding input XML file from the path given in step 3. Click Apply. Anychange to the input XML file starts the process.
7. Select the Enterprise Archive Object, Customer. Click Build Archive in the
Configuration tab. This creates an archive file. For more information oncreating an EAR file, see TIBCO ActiveMatrixAdapter for SAP Configuration andDeployment.
8. Exit TIBCO Designer.
34 | Chapter 2 TIBCO ActiveMatrix BusinessWorks: Working with the Customer Business Object
Deploy and Run the Example
-
7/29/2019 Tib Adsap Ex
48/126
TIBCO ActiveMatrix Adapter for SAP Examples
Perform the following tasks to deploy and run the example.
Task A Deploy the Example
In TIBCO Administrator:
1. Click on the Installed Software link on the left panel. Check if TIBCOActiveMatrix Adapter for SAP is registered. If the software is not registered,register by clicking the Add Custom Software button. Please refer to the
TIBCO Administrator documentation for more details on adding customsoftware.
2. Go to Application Management. Click New Application. Upload the EARfile created in the previous section and click OK. On the following screen,clear the Quick Configure check box and then click Save.
3. Click Configuration in the newly created application. Click on the top levelapplication name in the configuration view.
a. Go to the Advanced tab and provide the values for AppServer, Client,GatewayHost, GatewayService, ProgramID, SystemNumber,TIBCO_HOME, UserName
b. Click Save. The Configuration screen appears.
c. Click the Adapter archive and click Add To Additional Machines.
d. Select the machine and click OK. In the following screen, click Save.
e. In the Configuration screen click Deploy which will take you to the nextscreen. The Start successfully deployed services check box is selected bydefault. Click OK. The .tra files are created in\bin\domain\ .
4. Once the deployment is complete, click Service Instances under theapplication. The adapter is listed. Both the customer creation and customerfetching process is started. The adapter instance is also started.
Task B Run the Example
To run each example:
1. To trigger Create_Customer, you must make a change in theCreate_Customer_Send_Template.xml file and save. An example of theXML file is given next.
Deploy and Run the Example |35
3000
-
7/29/2019 Tib Adsap Ex
49/126
TIBCO ActiveMatrix Adapter for SAP Examples
3000
10
01
0000003000
Jigar
Kadakia
03031978
bangalore
123456
123456
334458
122230
123 ABC
ININ
1111
1111
E
EN
INRINR
The process with the help of the XML parser and the mapper constructs the datarequired for the adapter Request-Response service. The Invoke task triggers theRequest-Response service. The Request-Response service executes theBAPI_CREATE_CUSTOMERFROMDATA1 , which creates a customer in the SAP
36 | Chapter 2 TIBCO ActiveMatrix BusinessWorks: Working with the Customer Business Object
system.using the details given in the above XML file. The Request-Responseservice then sends back the reply to TIBCO ActiveWorks BusinessWorks. TIBCOA ti W k B i W k i th l d it i t XML f d
-
7/29/2019 Tib Adsap Ex
50/126
TIBCO ActiveMatrix Adapter for SAP Examples
ActiveWorks BusinessWorks receives the reply, renders it into an XML form andwrites that to BAPI_CREATE_CUSTOMERFROMDATA1 .xml file.
2. To trigger Get_Customer, you must make a change in theGet_Customer_Send_Template.xml input file. In the example given belowthe Customer number is changed:
TIBCO ActiveWorks BusinessWorks maps the data to the schema using aparser and mapper, and then passes the data to an invoke task. The Invoketask sends a request to the adapter Request-Response service. TheRequest-Response service fetches customer details from SAP usingbapi_customer_getdetail and sends back the reply to TIBCO ActiveWorksBusinessWorks. TIBCO ActiveWorks BusinessWorks receives the reply,renders the data into an XML format and writes that to an outputbapi_customer_getdetail.xml file.
3. When a Debmas IDoc is sent from SAP, the Sync_Customer processistriggered. For example:
When a Debmas IDoc is sent from SAP, the Subscription service activity in theTIBCO ActiveMatrix BusinessWorks process is triggered. The received IDoc isthen rendered into an XML and written to an output debmas.xml file.
Expected Results |37
Expected Results
-
7/29/2019 Tib Adsap Ex
51/126
TIBCO ActiveMatrix Adapter for SAP Examples
The example results can be viewed in the respective XML files written to:
\tibco\adapter\adr3\\examples\BusinessWorks\Customer
Create_Customer - Data is created based on the customer details specifiedin the input XML file and a customer is created in the SAP system. An XMLfile, bapi_create_customerfromdata1.xml (containing the customernumber of the customer created in the SAP system.) is created. In case of error,bapi_create_customerfromdata1_error.txt is created.
Get_Customer - Data is fetched based on the customer number specified inthe input XML file. The customer details are fetched and written into thebapi_customer_getdetail.xml file. In case of error,bapi_customer_getdetail_error.txt is created. Sample of thebapi_customer_getdetail.xml file is given next.
Jigar Kadakia
123 ABC
123456
1111
Sync_Customer
- Output (IDoc DEBMAS) is stored in thedebmas.xml
file.Sample of the debmas.xml is given next.
005
0000000100
Firma
DEOEM Meyer
Dsseldorf
05
38 | Chapter 2 TIBCO ActiveMatrix BusinessWorks: Working with the Customer Business Object
-
7/29/2019 Tib Adsap Ex
52/126
TIBCO ActiveMatrix Adapter for SAP Examples
|39
Chapter 3 TIBCO ActiveMatrix BusinessWorks:
Working with the SalesOrder Business
-
7/29/2019 Tib Adsap Ex
53/126
TIBCO ActiveMatrix Adapter for SAP Examples
Working with the SalesOrder Business
Object
This example shows how to use several adapter services within a TIBCOActiveMatrix BusinessWorks process to create and get SalesOrder details in the
SAP system
This example uses Java Messaging Service (JMS) as its transport type.
Topics
Example Description, page 40
Setup the Example, page 41 Test the Example, page 43
Expected Results, page 44
All files relevant to this example are located in the following location.
\tibco\adapter\adr3\\examples\BusinessWorks\SalesOrder
40 | Chapter 3 TIBCO ActiveMatrix BusinessWorks: Working with the SalesOrder Business Object
Example Description
-
7/29/2019 Tib Adsap Ex
54/126
TIBCO ActiveMatrix Adapter for SAP Examples
This example shows how the adapters Request-Response service can be used in a
TIBCO ActiveMatrix BusinessWorks process. The example has two processes,Create_SalesOrder and Get_SalesOrder.
Create_SalesOrder uses the adapters Request-Response service to create aSalesOrder record in the SAP system.
Create_SalesOrder uses the input XML file (containing details about thesales order to be created) to invoke the Request-Response service and creates asales order in the SAP system. It returns the sales order number for the sales
order created in the SAP system.
Any update in the input file triggers the Create_SalesOrder process. Theprocess with the help of the XML parser and the mapper constructs the datarequired for the adapter Request-Response service. The Invoke task triggersthe Request-Response service. The Request-Response service executes thebapi_salesorder_createfromdata1 , which creates a sales order in SAP. TheRequest-Response service then sends back the reply to TIBCO ActiveWorks
BusinessWorks. TIBCO ActiveWorks BusinessWorks receives the reply,renders it into an XML form and writes that to a file.
Get_SalesOrder uses the adapters Request-Response service to fetch datafrom SAP for a particular sales order. The data is fetched based on theCustomer number, Type of Material and Sales Organization thatyou specify in the input XML file. The data is sent back by the adapter toTIBCO ActiveMatrix BusinessWorks and is written into an output XML file.
Any update in the input file triggers the Get_SalesOrder process. TIBCOActiveWorks BusinessWorks maps the data to the schema using a parser andmapper, and then passes the data to an invoke task. Invoke task sends requestto the adapter Request-Response service. The Request-Response servicefetches sales order details from SAP using bapi_salesorder_getlist andsends back the reply to TIBCO ActiveWorks BusinessWorks. TIBCOActiveWorks BusinessWorks receives the reply, renders the data into an XMLformat and writes that to an output file.
For each of the above TIBCO ActiveMatrix BusinessWorks process, modify thedata in the input XML file corresponding to your SAP system.
Setup the Example |41
Setup the Example
-
7/29/2019 Tib Adsap Ex
55/126
TIBCO ActiveMatrix Adapter for SAP Examples
Before starting the example you must import the sample project zip file and save
it in a new project.
Task A Create_SalesOrder and Get_SalesOrder Setup:
In TIBCO Designer:
1. In the initial dialog box click Open New Project and specify a name for theproject.
2. Click Project>Import Full Project.
3. Click the Zip Archive tab and browse to locate the SalesOrder.zip file.
\tibco\adapter\adr3\\examples\BusinessWorks\Sales Order
4. Save the project as a multi-file project by the name SalesOrder.
5. Select the SalesOrder process.
6. Click the File Poller icon. In the configuration panel, File Name field, clickBrowse and select the corresponding input XML file from the path given instep 3. Click Apply.
7. Check the checkbox for Include Existing Files.
8. Include appropriate values for the following global variables:
AppServer
Client
GatewayHost
GatewayService
JMSProviderUrl
Password
ProgramID
SystemNumber
TIBCO_HOME (Home directory of the TIBCO installation)
UserName
9. Test the connection to ensure connectivity.
10. Validate the project to ensure there are no errors.
42 | Chapter 3 TIBCO ActiveMatrix BusinessWorks: Working with the SalesOrder Business Object
11. Convert the multi-file format to a dat file.
Export the multi-file project to a dat. Select Project>Export Full Project fromthe menu Browse and select the location of the directory you wish to save the
-
7/29/2019 Tib Adsap Ex
56/126
TIBCO ActiveMatrix Adapter for SAP Examples
the menu. Browse and select the location of the directory you wish to save thedat file to. Ensure that the directory is different from the multi-file project.Enter the name of the project and click OK.
12. Modify the repourl and configurl parameters in adr3.tra under
\tibco\adapter\adr3\\bin
folder to point to the dat file.
13. Run the adapter from the command line
adr3--propFile
\bin\adr3.tra
14. Exit TIBCO Designer.
Task B Start EMS Server
This example uses JMS as the transport type. Ensure that the TIBCO EnterpriseMessage Service server is running and accessible to the machine on which theadapter is installed before running any of the processes.
Test the Example |43
Test the Example
-
7/29/2019 Tib Adsap Ex
57/126
TIBCO ActiveMatrix Adapter for SAP Examples
In TIBCO Designer:
1. From the project panel, select the process you want to test. For example,Create_SalesOrder.
2. Click the Set Breakpoints icon.
3. In the window that appears, choose Select All, then click OK.
4. Click the Tester tab to the left of the project panel. The test panel replaces theproject tree.
5. Click the Start testing viewed process button.
6. In the process selection window that appears, the Create_SalesOrderprocess is selected by default. Click Load Selected. The process is now in Testmode. Any change to the input XML file starts the process.
7. Once the process starter is highlighted (indicating a process has started), clickthe Step to next activity icon to step through the process.
8. Click the Stop Testing icon to return to design mode.
9. Follow the above steps to test the other processes.
44 | Chapter 3 TIBCO ActiveMatrix BusinessWorks: Working with the SalesOrder Business Object
Expected Results
-
7/29/2019 Tib Adsap Ex
58/126
TIBCO ActiveMatrix Adapter for SAP Examples
The example results can be viewed in the respective XML files written to:
\tibco\adapter\adr3\\examples\BusinessWorks\Salesorder
1. Create_SalesOrder The results are directly reflected in the SAP system.The data is created based on the sales order details specified in the input XMLfile and a sales order is created in the SAP system. An XML file,bapi_salesorder_createfromdata1.xml (containing the Sales Ordernumber of the sales order created in the SAP system.) is created. In case oferror, bapi_salesorder_createfromdata1_error.txt is created. Sample of
the bapi_salesorder_createfromdata1.xml is shown next.
0000003050
Bush Holdings, Inc.
1 1 408 Michigan Avenue60611
CHICAGO
E
US
3000
0000003050
1000
0
0
0USD
0
NT30
00
00000000
19650921
0000003000
Thomas Bush Inc.1 1 2800 South 25th Ave
60153
MAYWOOD
E
US
0000000003
(312)450-BUSH
Dock 1
01
001
Expected Results |45
090000
124500
130000
170000
083000
-
7/29/2019 Tib Adsap Ex
59/126
TIBCO ActiveMatrix Adapter for SAP Examples
083000
120000
130000
170000
083000
120000
130000
150000
083000
120000
130000
170000
080000
120000
130000
140000
IL
1403118101
02
0001
0000003000
Thomas Bush Inc.
1 1 2800 South 25th Ave
60153
MAYWOOD
E
US
(312)450-BUSH
1
1
02
US0015
03
CIF
Chicago
9
X
02
USD
02100
3010
311
2. Get_SalesOrder The data is fetched based on the sales order Customernumber, Type of Material and Sales Organization specified in the inputXML file. The sales order details are fetched and written into
bapi_salesorder_getlist.xml file. In case of error,
46 | Chapter 3 TIBCO ActiveMatrix BusinessWorks: Working with the SalesOrder Business Object
bapi_salesorder_getlist_error.txt is created. Sample of thebapi_salesorder_getlist.xml file is given next.
-
7/29/2019 Tib Adsap Ex
60/126
TIBCO ActiveMatrix Adapter for SAP Examples
0000006369
000010
100-100
TA
20011009
10
20011009acbootsph987654321
00000000
99999999
0000450505
ac boots us customer
11.11
ST
0000006369
000010
100-100
TA
20011009
10
20011026
acbootsph987654321
0000000099999999
0000450505
ac boots us customer
11.11
ST
|47
Chapter 4 TIBCO ActiveMatrix BusinessWorks:
Working with the PurchaseOrder Business
-
7/29/2019 Tib Adsap Ex
61/126
TIBCO ActiveMatrix Adapter for SAP Examples
Object
This example shows how to use several adapter services within a TIBCOActiveMatrix BusinessWorks process to get and synchronize a Purchase Order
stored in the SAP system.
This example uses Java Messaging Service (JMS) as its transport type.
Topics
Example Description, page 48
Setup the Example, page 49 Test the Example, page 51
Expected Results, page 52
All files relevant to this example are located in the following location.
\tibco\adapter\adr3\\examples\BusinessWorks\PurchaseOrder
48 | Chapter 4 TIBCO ActiveMatrix BusinessWorks: Working with the PurchaseOrder Business Object
Example Description
This example shows how the adapters Subscription and Request-Response
-
7/29/2019 Tib Adsap Ex
62/126
TIBCO ActiveMatrix Adapter for SAP Examples
This example shows how the adapter s Subscription and Request Response
services can be used in a TIBCO ActiveMatrix BusinessWorks process. Theexample has two processes, Get_PurchaseOrder and Sync_PurchaseOrder.
Get_PurchaseOrder uses the adapters Request-Response Service to fetchdata from SAP for a particular purchase order. The data is fetched based onthe Purchase Order number you specify in the input XML file. The data issent back by the adapter to TIBCO ActiveMatrix BusinessWorks and is writteninto an output XML file.
Any update in the input file triggers the Get_PurchaseOrder process. TIBCOActiveWorks BusinessWorks maps the data to the schema using a parser andmapper, and then passes the data to an invoke task. The Invoke task sends arequest to the adapter Request-Response service. The Request-Responseservice fetches purchase order details from SAP using bapi_po_getdetailand sends back the reply to TIBCO ActiveWorks BusinessWorks. TIBCOActiveWorks BusinessWorks receives the reply, renders the data into an XMLformat and writes that to an output file.
Sync_PurchaseOrder subscribes to update or modification messages fromSAP whenever Purchase order details are modified or updated in the SAPsystem. On receiving the Purchase order details, TIBCO ActiveWorksBusinessWorks writes the IDoc to an XML file.
For each of the above TIBCO ActiveMatrix BusinessWorks process, modify thedata in the input XML file corresponding to your SAP system.
Setup the Example |49
Setup the Example
B f t ti th l t i t th l j t i fil d
-
7/29/2019 Tib Adsap Ex
63/126
TIBCO ActiveMatrix Adapter for SAP Examples
Before starting the example you must import the sample project zip file and saveit in a new project.
Task A Get_PurchaseOrder and Sync_PurchaseOrder Setup:
In TIBCO Designer:
1. In the initial dialog box click Open New Project and specify a name for theproject.
2. Click Project>Import Full Project.
3. Click the Zip Archive tab and browse to locate the PurchaseOder.zip file.
\tibco\adapter\adr3\\examples\BusinessWorks\Purchase Order
4. Save the project as a multi-file project by the name PurchaseOrder.
5. Select the PurchaseOrder process.6. Click the File Poller icon. In the configuration panel, File Name field, click
Browse and select the corresponding input XML file from the path given instep 3. Click Apply.
7. Check the checkbox for Include Existing Files.
8. Include appropriate values for the following global variables:
AppServer Client
GatewayHost
GatewayService
JMSProviderUrl
Password
ProgramID
SystemNumber
TIBCO_HOME (Home directory of the TIBCO installation)
UserName
9. Test the connection to ensure connectivity.
50 | Chapter 4 TIBCO ActiveMatrix BusinessWorks: Working with the PurchaseOrder Business Object
10. Validate the project to ensure there are no errors.
11. Convert the multi-file format to a dat file.
Export the multi-file project to a dat. Select Project>Export Full Project from
-
7/29/2019 Tib Adsap Ex
64/126
TIBCO ActiveMatrix Adapter for SAP Examples
the menu. Browse and select the location of the directory you wish to save thedat file to. Ensure that the directory is different from the multi-file project.Enter the name of the project and click OK.
12. Modify the repourl and configurl parameters in adr3.tra under
\tibco\adapter\adr3\\bin
folder to point to the dat file.
13. Run the adapter from the command lineadr3--propFile\bin\adr3.tra
14. Exit TIBCO Designer.
Task B Start EMS Server
This example uses JMS as the transport type. Ensure that the TIBCO Enterprise
Message Service server is running and accessible to the machine on which theadapter is installed before running any of the processes.
Test the Example |51
Test the Example
In TIBCO Designer:
-
7/29/2019 Tib Adsap Ex
65/126
TIBCO ActiveMatrix Adapter for SAP Examples
1. From the project panel, select the process you want to test. For example,Get_PurchaseOrder.
2. Click the Set Breakpoints icon.
3. In the window that appears, choose Select All, then click OK.
4. Click the Tester tab to the left of the project panel. The test panel replaces theproject tree.
5. Click the Start testing viewed process button.
6. In the process selection window that appears, the Get_PurchaseOrderprocess is selected by default. Click Load Selected. The process is now in Testmode. Any change to the input XML file starts the process.
7. Once the process starter is highlighted (indicating a process has started), clickthe Step to next activity icon to step through the process.
8. Click the Stop Testing icon to return to design mode.
9. Follow the above steps to test the other processes.
52 | Chapter 4 TIBCO ActiveMatrix BusinessWorks: Working with the PurchaseOrder Business Object
Expected Results
The example results can be viewed in the respective XML files written to:
-
7/29/2019 Tib Adsap Ex
66/126
TIBCO ActiveMatrix Adapter for SAP Examples
\tibco\adapter\adr3\\examples\BusinessWorks\PurchaseOrder
Get_PurchaseOrder The data is fetched based on the purchase ordernumber specified in the input XML file. The purchase order details are fetchedand written into bapi_po_getdetail.xml file. In case of error,bapi_po_getdetail_error.txt is created. Sample of thebapi_po_getdetail.xml file is shown next.
0000006945
00010101
Electronic Components Distributor
Foster City
Tower Lane 1082
Sync_PurchaseOrder The IDoc DEBMAS is stored in Orders01.xml file.Sample of the Orders01.xml file is given next.
Expected Results |53
EDI_DC40
800
0000000001133323
-
7/29/2019 Tib Adsap Ex
67/126
TIBCO ActiveMatrix Adapter for SAP Examples
/
45B30
1
2
ORDERS01
ORDERS
SAPIDS
LS
ID3CLNT800
A000000035
LS
LS
LSCHANDRA
20030916
102843
20030203171009
54 | Chapter 4 TIBCO ActiveMatrix BusinessWorks: Working with the PurchaseOrder Business Object
-
7/29/2019 Tib Adsap Ex
68/126
TIBCO ActiveMatrix Adapter for SAP Examples
|55
Chapter 5 TIBCO ActiveMatrix BusinessWorks:
Working with the Employee Business
-
7/29/2019 Tib Adsap Ex
69/126
TIBCO ActiveMatrix Adapter for SAP Examples
Object
This example shows how to use the adapters Request-Response service within aTIBCO ActiveMatrix BusinessWorks process to get an Employee record stored in
the SAP system.
This example uses TIBCO Rendezvous as its transport type.
Topics
Example Description, page 56
Setup the Example, page 57
Test the Example, page 59
Expected Results, page 60
All files relevant to this example are located in the following location.
\tibco\adapter\adr3\\examples\BusinessWorks\Employee
56 | Chapter 5 TIBCO ActiveMatrix BusinessWorks: Working with the Employee Business Object
Example Description
This example shows how the adapters Request-Response service can be used in a
TIBCO A i M i B i W k Th l h
-
7/29/2019 Tib Adsap Ex
70/126
TIBCO ActiveMatrix Adapter for SAP Examples
TIBCO ActiveMatrix BusinessWorks process. The example has one process,Get_Employee.
Get_Employee uses the adapters Request-Response Service to fetch datafrom SAP for a particular employee. The data is fetched based on theEmployee number you specify in the input XML file. The data is sent back bythe adapter to TIBCO ActiveMatrix BusinessWorks and is written into anoutput XML file.
Any update in the input file triggers the Get_Employee process. TIBCOActiveWorks BusinessWorks maps the data to the schema using a parser andmapper, and then passes the data to an invoke task. The Invoke task sends arequest to the adapter Request-Response service. The Request-Responseservice fetches employee details from SAP using bapi_employee_getdataand sends back the reply to TIBCO ActiveWorks BusinessWorks. TIBCOActiveWorks BusinessWorks receives the reply, renders the data into an XMLformat and writes that to an output file.
For each of the above TIBCO ActiveMatrix BusinessWorks process, modify thedata in the input XML file corresponding to your SAP system.
Setup the Example |57
Setup the Example
Before starting the example you must import the sample project zip file and save
it i j t
-
7/29/2019 Tib Adsap Ex
71/126
TIBCO ActiveMatrix Adapter for SAP Examples
it in a new project.
Task A Get_Employee Setup:
In TIBCO Designer:
1. In the initial dialog box click Open New Project and specify a name for theproject.
2. Click Project>Import Full Project.3. Click the Zip Archive tab and browse to locate the Employee.zip file.
\tibco\adapter\adr3\\examples\BusinessWorks\Employee
4. Save the project as a multi-file project by the name Employee.
5. Select the Employee process.
6. Click the File Poller icon. In the configuration panel, File Name field, clickBrowse and select the corresponding input XML file from the path given instep 3. Click Apply.
7. Check the checkbox for Include Existing Files.
8. Include the appropriate values for the following global variables:
AppServer
Client
GatewayHost
GatewayService
Password
ProgramID
SystemNumber
TIBCO_HOME (Home directory of the TIBCO installation)
UserName
9. Test the connection to ensure connectivity.
10. Validate the project to ensure there are no errors.
11. Convert the multi-file format to a dat file.
58 | Chapter 5 TIBCO ActiveMatrix BusinessWorks: Working with the Employee Business Object
Export the multi-file project to a dat. Select Project>Export Full Project fromthe menu. Browse and select the location of the directory you wish to save thedat file to. Ensure that the directory is different from the multi-file project.Enter the name of the project and click OK.
12 Modify the repourl and configurl parameters in adr3 tra under
-
7/29/2019 Tib Adsap Ex
72/126
TIBCO ActiveMatrix Adapter for SAP Examples
12. Modify the repourl and configurl parameters in adr3.tra under
\tibco\adapter\adr3\\bin
folder to point to the dat file.
13. Run the adapter from the command line
adr3--propFile\bin\adr3.tra
14. Exit TIBCO Designer.
Test the Example |59
Test the Example
In TIBCO Designer:
1 From the project panel select the process you want to test For example
-
7/29/2019 Tib Adsap Ex
73/126
TIBCO ActiveMatrix Adapter for SAP Examples
1. From the project panel, select the process you want to test. For example,Get_Employee.
2. Click the Set Breakpoints icon.
3. In the window that appears, choose Select All, then click OK.
4. Click the Tester tab to the left of the project panel. The test panel replaces theproject tree.
5. Click the Start testing viewed process button.
6. In the process selection window that appears, the Get_Employee process isselected by default. Click Load Selected. The process is now in Test mode.Any change to the input XML file starts the process.
7. Once the process starter is highlighted (indicating a process has started), clickthe Step to next activity icon to step through the process.
8. Click the Stop Testing icon to return to design mode.
60 | Chapter 5 TIBCO ActiveMatrix BusinessWorks: Working with the Employee Business Object
Expected Results
The example results can be viewed in the respective XML files written to:
\tibco\adapter\adr3\\examples\BusinessWork
-
7/29/2019 Tib Adsap Ex
74/126
TIBCO ActiveMatrix Adapter for SAP Examples
\ \ p \ \\ p \s\Employee
Get_Employee The data is fetched based on the Employee numberspecified in the input XML file. The employee details are fetched and writteninto bapi_employee_getdata.xml file. In case of error,bapi_employee_getdata_error.txt is created. Sample of thebapi_employee_getdata.xml is given next.
|61
Chapter 6 TIBCO ActiveMatrix BusinessWorks:
Working with the ItemMaster Business
Object
-
7/29/2019 Tib Adsap Ex
75/126
TIBCO ActiveMatrix Adapter for SAP Examples
Object
This example shows how to use the adapters Request-Response service within aTIBCO ActiveMatrix BusinessWorks process to get and synchronize material
details stored in the SAP system.
This example uses TIBCO Rendezvous as its transport type.
Topics
Example Description, page 62
Setup the Example, page 63
Test the Example, page 65
Expected Results, page 66
All files relevant to this example are located in the following location.
\tibco\adapter\adr3\\examples\BusinessWorks\ItemMaster
62 | Chapter 6 TIBCO ActiveMatrix BusinessWorks: Working with the ItemMaster Business Object
Example Description
This example shows how the adapters Subscription and Request-Response
services can be used in a TIBCO ActiveMatrix BusinessWorks process. Theexample has two processes Get ItemMaster and Sync ItemMaster
-
7/29/2019 Tib Adsa