How To Use the ESR Eclipse Tool with the Enterprise ......For the exercise, the scenario is as...
Transcript of How To Use the ESR Eclipse Tool with the Enterprise ......For the exercise, the scenario is as...
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 1
How To Use the ESR Eclipse Tool
with the Enterprise Service
Repository
Applies to:
SAP NetWeaver Process Orchestration 7.31 SP2 SAP NetWeaver Process Integration PI 7.31 SP2
Summary
With PI 7.31 SP2, an Eclipse tool was introduced to allow us to develop an end-to-end integration scenario. The Eclipse tool can be used instead of the classical Swing tool. Both tools will continue to exist, and can be used interchangeably.
This article describes the creation of objects in the Enterprise Service Repository, which the first of two article of the development process. The second article consists of the configuration tasks using the Eclipse tool, iFlow, which is described separately.
This article can be used independently by itself to get an overview of the ESR Eclipse tool, or can be used in conjunction with iFlow, the Eclipse configuration tool, to build a complete end-to-end integration.
Author: William Li
Company: SAP Labs LLC
Created on: April 2012
Author Bio
William Li is a member of the SAP NetWeaver Orchestration and Integration Team in SAP NetWeaver Solution Management. He has been with SAP since 1998 - originally as a SAP America consultant, as a developer at SAPLabs and then as a SAP NetWearver RIG member focused on Process Integration. He joined SAP NetWeaver Solution Management in April of 2010.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 2
Table of Contents
Abstract ............................................................................................................................................................... 3
Step-by-Step Instructions ................................................................................................................................... 3
Create Data Types .......................................................................................................................................... 6
Create Service Interfaces.............................................................................................................................. 12
Create Message Mappings ........................................................................................................................... 18
Create Operation Mappings .......................................................................................................................... 23
Activate the Change List ............................................................................................................................... 28
Additional Information ....................................................................................................................................... 29
Copyright........................................................................................................................................................... 30
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 3
Abstract
This article goes through the step-by-step creation of objects in the Enterprise Service Repository using the Eclipse tool.
This is the first of two articles of the end-to-end development of an integration scenario. The second article will be the configuration part of the integration scenario using iFlow (integration flow).
With the two articles, a complete end-to-end integration can be developed using Eclipse.
For the exercise, the scenario is as follow:
Article 1: How To Use the ESR Eclipse Tool with the Enterprise Service Repository
Article 2: How To Use the iFlow Eclipse Tool with the Integration Directory
Step-by-Step Instructions
The tasks involved in the creation of artifacts in the Enterprise Service Repository are:
Create data types for the sender and receiver messages.
Create the service interfaces for the sender and receiver systems.
Create message mapping to map the file data to JDBC-required XML to insert/update the data to an
SQL table.
The NetWeaver Developer Studio 7.31 use in this guide can be downloaded from the SAP NetWeaver Developer Studio Update Site:
https://nwds.sap.com/swdc/downloads/updates/netweaver/nwds/nw/731/
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 4
Step Description Screenshot
1 After launching NWDS, open the ESR perspective:
Windows Open Perspective Other…
2 Select Enterprise Services Repository and click “OK”
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 5
3 Enter location of the ESR:
View Menu Change Preferences
Enter ESR Server Information:
4 Connect to the ESR
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 6
5 Enter logon info
Create Data Types
6 Create a data type by opening the SWCV and namespace, then right-click on the Data Type and click on “New Data Type”
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 7
7 Enter Data Type name: DT_CustInfo
Click “Finish”
8 Create a new ChangeList or select an existing one. In this example, create a new one.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 8
9 Enter a ChangeList name
Click “OK”
10 Add elements to the data type. There are 2 ways to add element:
Highlight the parent node and click “Add Element”
-OR-
Right-click on the parent node and select “Add Element”
-OR-
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 9
11 Enter the element name: CustNo
Click on “Browse…” to
enter the type.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 10
12 Select the data type:
a. Enter “s” in the Search Scope for “string”.
b. Select “string” in the list of Available Objects.
c. Click “OK”.
13 Repeat the above step to enter all the elements:
CustName
CustAddress
CustCity
CustState
CustZip
CustPhone
14 Save the data type.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 11
15 Create a data type, DT_Request, with the
following structure:
DT_Request
record
cust_no
name
address
city
state
zip
phone
Note: For record, there is a Min and Max occurance.
16 Create a data type, DT_InsertCustInfo, with the following structure:
DT_InsertCustInfo
insertUpdate
table
action
table
access
key1
CustNo
Note:
insertUpdate has Min and Max Occurs
element, action, is an attribute
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 12
access has a type of DT_CustInfo, which
was created earlier
Create Service Interfaces
17 Create an outbound, asynchronous interface using the DT_Request
created in step 15.
Right-click on Service Interface and select New
Service Interface
18 Enter interface name: SI_Request_Async_Out
Click: Finish
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 13
19 Select the change list CL_MyDemo
20 Expand the “Advanced”
tab.
In Category, select “outbound” in the
dropdown.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 14
21 Click “OK” on the warning
textbox.
22 Under Operations, click: SI_Request_Async_Out
23 Click “Add Input Message”
24 Under Details, for Name, click Browse.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 15
25 Select DT_Request and click Next.
26 Click “Create Message Type…”.
NOTE: if there is an existing Message Type based on DT_Request, it will be displayed.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 16
27 Enter “MT_Request” and click Finish.
28 Select “MT_Request” and click Finish.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 17
29 Click the disk button to save the interface.
30 Repeat steps 17-29 to create the interface
SI_InsertCustInfo_Async_In
Select Inbound for the Category in the Advanced tab.
Select the data type DT_InsertCustInfo
Create message type MT_InsertCustInfo
In the Definition tab, after creation:
31 Repeat steps 17-29 to create the interface SI_Request_Async_In
Select Inbound for the Category in the Advanced tab.
Select the data type DT_Request.
Select the existing message type MT_Request.
In the Definition tab, after creation:
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 18
Create Message Mappings
32 Create a mapping to insert a row into a table.
Right-click on Message Mapping and click on “New Message Mapping”.
33 Enter name: Request_to_InsertCustInfo
Click “Finish”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 19
34 Use the existing change list: CL_MyDemo
Click “OK”.
35 On the right side of the Message Mapping Overview, under Source Messages, click on “Add”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 20
36 Select MT_Request, which was created in a previous step, and click “OK”.
37 Under Target Messages, click “Add”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 21
38 Select MT_InsertCustInfo and click “OK”.
39 Click on the “Definition” tab on the bottom and expand the elements of the message types.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 22
40 Drag-n-drop the elements from the source to the target as displayed.
41 Constants will need to be assigned to “action” and “table”.
One way to do this is to drag-n-drop any source element to the “action” and “table”, even though we will not use the source element.
Click on the function symbol, fx, for each
element.
42 On the right side, expand “Functions”.
Expand/find and double-click on the “const(String value)” function.
For “action”, enter: const(“UPDATE_INSERT”)
For “table”, enter:
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 23
const(“CustInfo”)
43 The resulting mapping is displayed.
Save the mapping.
Create Operation Mappings
44 Right-click on Operation Mappings and select “New Operation Mapping”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 24
45 Enter name: Request__InsertCustInfo
Click “Finish”.
46 Select the existing change list, CL_MyDemo, and click “OK”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 25
47 On the right side of Operation Mapping Overview, under Source Operations, click on “Add…”.
48 Select the operation “SI_Request_Async_Out”, and click “OK”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 26
49 Under Target Operations, click on “Add…”.
50 Select operation SI_InsertCustInfo_Async_In and click “OK”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 27
51 Click the tab “Definition” on the bottom.
Double-click on the function symbol, fx.
52 Click “Add” to assign
mapping program.
53 Click to select the mapping program.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 28
54 Select the message mapping and click “OK”.
Click “OK” again to
complete the assignment.
Save the Operation Mapping.
Activate the Change List
55 Activate the changes by right-click on the change list and click on “Activate”.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 29
Using the Swing tool of the ESR, all the newly created design artifacts can be examined.
Additional Information
There are still some gaps between the Swing tool and the Eclipse tool in the initial release of PI 7.31 SP2:
Importing RFC & IDocs
Context Objects
Funcition Libraries
Mapping Templates
Test tool
Except for the test tool, the other gaps will be closed in the next update, PI 7.31 SP4.
How To Use the ESR Eclipse Tool with the Enterprise Service Repository
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2012 SAP AG 30
Copyright
© Copyright 2012 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.