SAP Exchange Infrastructure - Graphical Mapping · SAP AG, TechEd EMEA, BPI252 Graphical Mapping,...

18
Joachim Orb SAP AG Thomas Volmering SAP AG SAP Exchange Infrastructure - Graphical Mapping SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 2 Learning Objectives As a result of this workshop, you will be able to: Handle the graphical mapping editor Use predefined standard functions Enhance your mappings with user-defined functions Test your mappings

Transcript of SAP Exchange Infrastructure - Graphical Mapping · SAP AG, TechEd EMEA, BPI252 Graphical Mapping,...

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 1

Joachim OrbSAP AGThomas VolmeringSAP AG

SAP Exchange Infrastructure -Graphical Mapping

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 2

Learning Objectives

As a result of this workshop, you will be able to:

Handle the graphical mapping editorUse predefined standard functionsEnhance your mappings with user-defined functionsTest your mappings

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 2

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 3

Agenda

Concepts

Handling

Standard FunctionsDemoExercise

Node FunctionsDemoExercise

User-defined Functions

Summary

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 4

Agenda

Concepts

Handling

Standard FunctionsDemoExercise

Node FunctionsDemoExercise

User-defined Functions

Summary

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 3

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 5

<hh:book-flight xmlns:hh="..."><hh:customer>

<hh:first-name>Micheal</hh:first-name><hh:surname>Moore</hh:surname>

</hh:customer><hh:booking-data>

<hh:airline>Airline Kingdom</hh:airline><hh:connection>AK087</hh:connection><hh:date>2001-11-22</hh:date><hh:class>business</hh:class>

</hh:booking-data></hh:book-flight>

<ak:BookFlight xmlns:ak="..."><ak:Date>22.11.2001</ak:Date><ak:Flight>087</ak:Flight><ak:Passenger>Micheal Moore</ak:Passenger><ak:Class>2</ak:Class><ak:Agency>Happy Holiday</ak:Agency>

</ak:BookFlight>

Concepts - General Mapping Types

MappingTransformation from one message structure to anotherTransformation of one key value to another

Structure Mapping

Value Mapping

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 6

Concepts – Mapping at Runtime

Messages in XI contain a sender interface

IS evaluates configuration data of the Integration DirectoryDuring logical routing, the IS determines a receiver interface (1)Such an interface pair can optionally reference an interface mappingAn interface mapping points to one or more mapping programs(for request, response and/or fault messages)IS executes mapping program on J2EE server (2)

Integration Server (IS)

Message

MessageHeader:LogicalSender

Payload:SenderDocument

Logical Routing

Message

MessageHeader:ReceiverAddress

Payload:ReceiverDocument

TechnicalR

outing

Mapping

Business System

D

etermination

Receiver

Interface D

etermination

1 2

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 4

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 7

Integration Repository

Request

Fault

FaultMessage Type

InboundMessage Interface

FaultMessage Type

OutboundMessage Interface

RequestMessage Type

Response

ResponseMessage Type

RequestMessage Type

Message MappingXSLT MappingJava Mapping

Message MappingXSLT MappingJava Mapping

ResponseMessage Type

Interface Mapping(s)

Message MappingXSLT MappingJava Mapping

Concepts - Relate Mapping Programs to Interfaces

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 8

Concepts - Mapping in SAP XI

Message MappingDesigned by using the graphical mapping editor of Integration BuilderResult: Generated Java Code.

Imported ArchivesImport externally defined mapping programs into repositoryJava mapping:Implemented by using a specific interface XSLT mapping:

Runtime supports XSLT processorJava methods can be called from within a Style Sheet

You can execute mapping programs in a sequence(Only for a request or a response message)

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 5

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 9

Concepts – Message Mapping Functions

Standard FunctionsE.g. string processing, number/date formatting, boolean, …

Value Mapping

Node functions

User-defined functionsJava method

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 10

Agenda

Concepts

Handling

Standard FunctionsDemoExercise

Node FunctionsDemoExercise

User-defined Functions

Summary

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 6

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 11

Handling

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 12

Data-Flow Editor

Structure Overview

Source StructureSource Structure Target StructureTarget Structure

Target Field Mapping

Handling – Mapping Editor

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 7

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 13

Handling – Elements

Attribute

Element is mandatory and might re-occur (minOccurs>0, maxOccurs>1)

Element is mandatory (minOccurs>0)

Parent node might repeat (maxOccurs>1)

Element might repeat (maxOccurs>1)

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 14

Handling- Assignment of Fields

drag&dropdrag&dropdrag&drop

Double click on a green/yellow field

=navigate to

target field mapping

Double click on a white field

=insert field intodata-flow editor

Double click on an any field

=insert field intodata-flow editor

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 8

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 15

Handling- Text Preview

All target field mappings

Text Preview

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 16

Agenda

Concepts

Handling

Standard FunctionsDemoExercise

Node FunctionsDemoExercise

User-defined Functions

Summary

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 9

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 17

Standard Functions: Introduction

All functions expect and return string values

String value is cast to needed type according to standard function

Generating functions ‘produce’ values (for example: Constant)

Some standard functions provide function propertiesFor example: concat let’s you additionally specify a delimiterCall the function properties window by double clicking the function

R = f(X1,X2)X1

X2R

R = f(X1,X2,X3)X1

X2 RX3

O = f(I)I O

O = Generated Value O

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 18

Simple Standard Functions: concat

Function category: Text

<?xml version="1.0" encoding="UTF-8" ?>

<Contact><name>

Harry Potter</name>

</Contact>

<?xml version="1.0" encoding="UTF-8" ?>

<Customer><firstname>

Harry</firstname><surname>

Potter </surname>

</Customer>

Target MessageMappingSource Message

concat propertiesDelimiter=“ “

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 10

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 19

Simple Standard Functions: substring

Function category: Text

Position count for all text functions start at 0!

<?xml version="1.0" encoding="UTF-8" ?>

<Contact><customerNo>

0123456789</customerNo>

</Contact>

<?xml version="1.0" encoding="UTF-8" ?>

<Customer><customerID>0123456789-181170</customerID>

</Customer>

Target MessageMappingSource Message

substring propertiesstart from: 0count: 10

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 20

Simple Standard Functions: DateTrans

Function category: Date

<?xml version="1.0" encoding="UTF-8" ?>

<Contact><birthday>

11/18/1970</birthday>

</Contact>

<?xml version="1.0" encoding="UTF-8" ?>

<Customer><custBirthday>

181170</custBirthday>

</Customer>

Target MessageMappingSource Message

DateTrans propertiessrc Format: ddMMyydst Format: MM/dd/yyyy

•uses standard Java date template

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 11

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 21

Demo

Demo

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 22

Agenda

Concepts

Handling

Standard FunctionsDemoExercise

Node FunctionsDemoExercise

User-defined Functions

Summary

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 12

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 23

Node Functions – Contexts

Context ChangeMessage mapping works internally by using queuesIf no further elements are imported at a particular hierarchy level, a Context Change is inserted in the queueUse node functions to handle changes in the message hierarchy.

removeContexts

deletes all context changes of a queue

SplitByValue

insert additional context changes in a queue

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 24

Node Functions – removeContexts (I)

<?xml version="1.0" encoding="UTF-8" ?>

<Test_In_Remove><item>A.one</item><item>A.two</item><item>A.three</item><item>B.one</item><item>B.two</item>

</Test_In_Remove

<?xml version="1.0" encoding="UTF-8" ?>

<Test_Out_Remove><header name=“A"><item>A.one</item> <item>A.two</item> <item>A.three</item>

</header><header name="B"><item>B.one</item> <item>B.two</item>

</header></Test_Out_Remove>

Target MessageMappingSource Message

With removeContexts

use removeContext() to delete the parent context of an element.

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 13

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 25

Node Functions – removeContexts (II)

Target MessageMappingSource Message<?xml version="1.0" encoding="UTF-8" ?>

<Test_In_Remove><item>A.one</item> <item>A.two</item> <item>A.three</item>

</Test_In_Remove>

<?xml version="1.0" encoding="UTF-8" ?>

<Test_Out_Remove><header name=“A"><item>A.one</item> <item>A.two</item> <item>A.three</item>

</header><header name="B"><item>B.one</item> <item>B.two</item>

</header></Test_Out_Remove>

Without removeContexts

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 26

Demo

Demo

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 14

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 27

Agenda

Concepts

Handling

Standard FunctionsDemoExercise

Node FunctionsDemoExercise

User-defined Functions

Summary

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 28

User-Defined Functions – Overview

Functional enhancements if standard functions do not fulfill requirementsIntegration of Java programs from imported archivesUsage just like standard functions

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 15

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 29

User-Defined Functions – Editor

Simple editor functionsUsage of imported Java programsSingle return value is of type java.lang.String

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 30

Agenda

Concepts

Handling

Standard FunctionsDemoExercise

Node FunctionsDemoExercise

User-defined Functions

Summary

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 16

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 31

Summary

Introduction to the graphical mapping tool

Mapping techniques in XI : Message MappingJava MappingXSLT Mapping

Message Mapping Standard FunctionsNode FunctionsUser-defined Functions

Test Mode

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 32

Further Information

Public Web:www.sap.com/solutions/netweaver/exchangeinfrastructureSAP Customer Services Network: www.sap.com/services/

Related Workshops/Lectures at SAP TechEd 2003SAP Exchange Infrastructure - Integrating SAP applications, Date/Time, Room, Hands-on (4h)SAP Exchange Infrastructure - Utilize SAP Adapters to Connect to Heterogeneous Systems, Date/Time, Room, Hands-on (4h)

Related SAP Education Training Opportunitieshttp://www.sap.com/usa/education/TZXIDC, Early Product Training Development & Configuration SAP XI 2.0

Consulting ContactRoy Wood, VP SAP NetWeaver Consulting Practice ([email protected])

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 17

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 33

Q&A

Questions?

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 34

Please complete your session evaluation anddrop it in the box on your way out.

Feedback

Thank You !

The SAP TechEd ’03 Basel Team

SAP TechEd ‘03 Basel

© 2003 SAP AG BPI 252, Joachim Orb; Thomas Volmering 18

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 35

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®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation.

IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®, Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA 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®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.

HTML, DHTML, XML, XHTML 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.

MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.

SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com 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 in several other countries all over the world. All other product and service names mentioned are trademarks of their respective companies.

Copyright 2002 SAP AG. All Rights Reserved

SAP AG, TechEd EMEA, BPI252 Graphical Mapping, Thomas & Joachim / 36

Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.

Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte können Softwarekomponenten auch anderer Softwarehersteller enthalten.

Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® und SQL Server® sind eingetragene Marken der Microsoft Corporation.

IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®, Informixund Informix® Dynamic ServerTM sind Marken der IBM Corporation in den USA und/oder anderen Ländern.

ORACLE® ist eine eingetragene Marke der ORACLE Corporation.

UNIX®, X/Open®, OSF/1® und Motif® sind eingetragene Marken der Open Group.

Citrix®, das Citrix-Logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® und andere hier erwähnte Namen von Citrix-Produkten sind Marken von Citrix Systems, Inc.

HTML, DHTML, XML, XHTML sind Marken oder eingetragene Marken des W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

JAVA® ist eine eingetragene Marke der Sun Microsystems, Inc.

JAVASCRIPT® ist eine eingetragene Marke der Sun Microsystems, Inc., verwendet unter der Lizenz der von Netscape entwickelten und implementierten Technologie.

MarketSet und Enterprise Buyer sind gemeinsame Marken von SAP AG und Commerce One.

SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com und weitere im Text erwähnte SAP-Produkte und -Dienst-leistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und anderen Ländern weltweit. Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen.

Copyright 2002 SAP AG. Alle Rechte vorbehalten