Вы находитесь на странице: 1из 84

SAP NetWeaver Exchange Infrastructure Mapping Troubleshooting

William Li SAP NetWeaver RIG Americas

XI Mapping Troubleshooting Goals of the Session

At the end of this session:


Understand the mapping architecture within Exchange Infrastructure. Be able to determine the best practice during mapping development. Resolve possible mapping problems during development and runtime.

SAP AG 2005, XI Mapping Troubleshooting - 2

XI Mapping Troubleshooting A Brief Introduction

This session will not show how to develop mapping programs. It is assumed that the audience already possesses the knowledge to develop mapping programs. This session will show the mapping service provided in XI, how to best develop mapping programs to minimize performance problems, and how to troubleshoot mapping programs.

SAP AG 2005, XI Mapping Troubleshooting - 3

SAP XI Mapping Troubleshooting

Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 4

Places where mappings can run


Mappings can run not only in the pipeline of the Integration Server...
ccBPM Transformation Step

Receiver Determination

IS Pipeline

Directory Simulation Tool

Repository Test

PCK

Mapping Runtime Service

You can execute mappings in the Repository, PCK, Simulation Tool in the Directory, IS Pipeline, BPM, Dynamical Receiver Determination.
They all use the same Mapping Runtime Service

SAP AG 2005, XI Mapping Troubleshooting - 5

Places where mappings can run

Receiver Determination

ccBPM Transformation Step

IS Pipeline

Directory Simulation Tool

Repository Test

PCK

Mapping Runtime Service

Remarks: You have to activate objects before you can test them in the Directory Simulation Tool. Otherwise, the objects are not in the runtime cache. If a mapping test is successful in the Repository, but fails at runtime: usually the XML documents are different. (Whether or not a mapping fails can depend on the XML source document.) Dynamical Receiver Determination (SP 16): The Receiver Determination calls a mapping whose result XML contains the list of receivers.

SAP AG 2005, XI Mapping Troubleshooting - 6

Pipeline Services on the IS (synchronous message)

Determines Receiver Interface and Interface Mapping Interface Determination

Executes request mapping steps Mapping of Request

Sender Interface

Receiver Interface

Mapping of Response

Executes response mapping steps

SAP AG 2005, XI Mapping Troubleshooting - 7

Mapping Objects
Directory Interface Determination
configuration: which mapping for which message?

Repository Interface Mapping


bundles mapping steps of request and response request response

These are the objects that are relevant for the pipeline services to work. They are copied into the runtime cache at activation time. The implementation of the Mapping Runtime is divided into two parts on the ABAP and Java stack of the Integration Server. The cache is also devided into an ABAP and Java part. Interface Determinations and Interface Mappings are in the ABAP cache. Message Mappings and Imported Archives are in the Java cache.
SAP AG 2005, XI Mapping Troubleshooting - 8

Message Mapping
definition of the mapping, and generated Java code

Mapping Archive
contains the implementation of self-written Java and XSLT mappings

Runtime and Cache (a)


Java Cache
Programs from Message Mappings and Mapping Archives

Mapping Runtime Service


Java Stack

JCO

ABAP Cache Interface Determination Service

Interface Determinations Interface Mappings

Mapping Runtime Service

ABAP Stack

Sender Interface

Receiver Interface

SAP AG 2005, XI Mapping Troubleshooting - 9

Runtime and Cache (b)


1

The Interface Determination looks up the receiver interface in the ABAP cache. It also determines:
the ID of the Interface Mapping, the SWCV (software component version) of the Interface Mapping.

The ABAP Mapping Runtime looks up the mapping steps of this Interface Mapping in the ABAP cache:
mapping type (XSLT / Java / ...) program name

The Java Mapping Runtime loads the program from the Java Cache and executes it.

SAP AG 2005, XI Mapping Troubleshooting - 10

Mapping Program Missing in the Java Cache


Java Cache
Programs from Message Mappings and Mapping Archives RESOURCE NOT FOUND JCO

Mapping Runtime Service


Java Stack

ABAP Cache Interface Determination Service


Interface Determinations Interface Mappings

Mapping Runtime Service


ABAP Stack

Sender Interface

Receiver Interface

SAP AG 2005, XI Mapping Troubleshooting - 11

Interface Mapping is missing in the ABAP Cache


Java Cache
Programs from Message Mappings and Mapping Archives

Mapping Runtime Service


Java Stack

JCO

ABAP Cache Interface Determination Service


Interface Determinations Interface Mappings

Mapping Runtime Service


ABAP Stack

NO MAPPING PROGRAM FOUND

Sender Interface

Receiver Interface

SAP AG 2005, XI Mapping Troubleshooting - 12

No Mapping Configured
Java Cache
Programs from Message Mappings and Mapping Archives It is not an error if there is no Interface Determination for a message the message is processed without changing the interface name, and without mapping. Trace entry: no mapping configured.

Mapping Runtime Service


Java Stack

JCO

ABAP Cache Interface Determination Service


Interface Determinations Interface Mappings

Mapping Runtime Service


ABAP Stack

Sender Interface

Receiver Interface

SAP AG 2005, XI Mapping Troubleshooting - 13

Interface Determination not unique


Java Cache
Programs from Message Mappings and Mapping Archives

Mapping Runtime Service


Java Stack

RELATION NOT UNIQUE Old cache entries were not deleted. Cache contains old and new entries simultaneously. The select of the Interface Determination has no unique result. OSS message 81662 2006, Note 923068

JCO

ABAP Cache Interface Determination Service


Interface Determinations Interface Mappings

Mapping Runtime Service


ABAP Stack

Sender Interface

Receiver Interface

SAP AG 2005, XI Mapping Troubleshooting - 14

SAP AG 2005, XI Mapping Troubleshooting - 15

Cache of a single object (b)

The cache refresh for a single object can also be triggered on the Administration page > Cache Overview > Select the object type Interface Mapping Message Mapping Imported Archive MAPPING XI_TRAFO TRAFO_JAR

> Enter object ID and the ID of the software component version > Refresh Object
SAP AG 2005, XI Mapping Troubleshooting - 16

Cache of a single object (c)


Object ID and SWCV ID of the Interface Mapping are in the runtime trace:

... or in the Repository: 1. Open the Interface Mapping > Info button > Object ID, 2. Open the SWCV > key tab > GUID
SAP AG 2005, XI Mapping Troubleshooting - 17

Planned Improvements
It is possible that mappings are not found temorarily around the time a cache refresh is done. The cache refreshes the mapping program at the same time when they should be read by the runtime. The consequence is a resource not found exception. The mappings in the runtime are not re-loaded each time for each message. The Java classloaders and XSLT transformer are used. This should prevent this error. Planned improvements: Minimize time between delete and insert during the exchange of the mapping program. Do not cache more objects than necessary. (After an import of an SWCV, the objects of overlying SWCVs are unnecessarily cached.)

SAP AG 2005, XI Mapping Troubleshooting - 18

SAP XI Mapping Troubleshooting

Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 19

Overview of the message mapping runtime

Pipeline infrastructure. Mapping step is executed via JCo from R/3 system.

SAP AG 2005, XI Mapping Troubleshooting - 20

Overview of the message mapping runtime

Java VM

- Mapping program is loaded from java archive. - It also can use other archives from the same SWCV

Mapping program Mapping program

SAP AG 2005, XI Mapping Troubleshooting - 21

Overview of the message mapping runtime

Source payload

Mapping program Mapping program

Result payload

To execute a mapping program the source payload and the header parameters map are necessary. This map also contains an instance of AbstractTrace object which can be used to write application logs. This logs can be found in the message monitor (sxmb_moni transaction) afterwards.

SAP AG 2005, XI Mapping Troubleshooting - 22

Overview of the message mapping runtime


JavaVM

Source payload

Mapping program Mapping program

Mapping program Mapping program

Result payload

If the scenario uses several steps mapping, these mappings are executed in one JCo call and the intermediate payload is not persisted. You cant find it in sxmb_moni transaction.

SAP AG 2005, XI Mapping Troubleshooting - 23

SAP XI Mapping Troubleshooting

Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 24

Troubleshooting for Message Mapping

Even well tested mappings might fail at runtime Main reason: message instance not compliant with xml schema definition Use testing mode of the graphical mapping editor to examine the problem

SAP AG 2005, XI Mapping Troubleshooting - 25

What to do, if a Well Tested Mapping Fails at Runtime?


1. Download message payload from the Integration Engine Monitor (TA sxmb_moni) 2. Upload payload in the Testing tab of the concerned Message Mapping 3. When executing the test, you should get the same error as displayed in the Integration Engine Monitor (TA sxmb_moni)* 4. Debug your Message Mapping (display queue)

*) There might be slight differences as shown on the following slides

SAP AG 2005, XI Mapping Troubleshooting - 26

Difference of IB Test Mode and Runtime Execution


In test mode the mapping is executed on the J2EE server running the repository (i.e. not the runtime server) Message metadata is not filled automatically in the Integration Builder, but can be set manually

Value mappings and look-ups are runtime specific


SAP AG 2005, XI Mapping Troubleshooting - 27

SAP XI Mapping Troubleshooting


Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Import/export the message mapping using file system Using sxmb_moni transaction to get a real payload Difference between IB test mode and real runtime ValueMapping, imported archives issues Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 28

Import/export message mappings via file system


When we need help from SAP to resolve the problem, we must: Objective
1 get the export file for the message mapping 2 get a source payload used in the scenario 3 get a result payload after the mapping

Why?
To isolating the problem from other components influence Avoid customer system connection problems Usually SAPs capabilities to debug the scenario are much better then at the customer site. We are not always able to play around with the customer systems. If the scenario executed at SAP doesnt work the same way as on the customer system it means that it is SP or configuration problem.

SAP AG 2005, XI Mapping Troubleshooting - 29

Import/export message mappings via file system


1 Open the message mapping 2 put the cursor to description field 3 press CTRL+SHIFT+0 to open the Technical info dialog 4 This dialog also contains buttons to export/import the message mapping to/from the file system.

Export to file

SAP AG 2005, XI Mapping Troubleshooting - 30

Import/export message mappings via file system

- Export button exports the mapping, source and target structures, byte code and java source code to *.xim file which can be saved to a file system. - Import button is available only for newly created message mapping objects and imports source message, target message and mapping definition. - If you exported and modified the mapping then you need to use the third button for import. This button loads only mapping definition leaving source and target structure intact. - For lower support packages where the third button is not available one can create a new message mapping, import the *.XIM file and replace source and target structures with original ones.

SAP AG 2005, XI Mapping Troubleshooting - 31

SAP XI Mapping Troubleshooting


Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Import/export the message mapping using file system Using sxmb_moni transaction to get a real payload Difference between IB test mode and real runtime ValueMapping, imported archives issues Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 32

SXMB_MONI message monitor


Log in to the ABAP stack of XI. Select sxmb_moni transaction. Select Monitor for Processed XML Messages

Find a message using time stamp, message id or processing status

SAP AG 2005, XI Mapping Troubleshooting - 33

SXMB_MONI message monitor


Double click on the message to open a message processing log.

To save a payload to a file system go to XML Messages menu and choose Download window 2

SAP AG 2005, XI Mapping Troubleshooting - 34

SXMB_MONI message monitor


You can copy the message ID to clipboard by setting the cursor at the XML-Message node and pressing CTRL+C

If the original message was retrieved based on some search criteria like time stamps or XI message processing status, please attach the exact XI message ID to the customer message to exclude misunderstandings. Sometimes the same scenario was processed several times with different payloads and the exact message is needed to detect the problem.

SAP AG 2005, XI Mapping Troubleshooting - 35

SXMB_MONI message monitor


How to find the mapping program from the trace Go to the message processing monitor Choose Request Message Mapping node Choose SOAP header/Trace item In the lower pane search for Interface-Mapping string (usually the last occurrence is valid)

Open the Integration Builder Search for the same Interface-Mapping name.

SAP AG 2005, XI Mapping Troubleshooting - 36

SXMB_MONI message monitor


Open the Integration Builder Search for the Interface-Mapping.

In the interface mapping you can navigate to the used mapping by double clicking the mapping name

SAP AG 2005, XI Mapping Troubleshooting - 37

SAP XI Mapping Troubleshooting


Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Import/export the message mapping using file system Using sxmb_moni transaction to get a real payload Difference between IB test mode and real runtime ValueMapping, imported archives issues Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 38

Difference of IB test mode and runtime execution


The main difference is the Header parameters map that is passed to the mapping program. In design time this map is filled with default values and to reproduce a runtime behavior one have to enter correct values into this map.

The next difference is that in the test mode the mapping is executed on the J2EE server running repository and not a runtime server. In most cases the result is the same. The difference can occur if the mapping program uses ValueMapping, self defined functions that access database, RFC calls, use system specific data or custom deployed J2EE libraries.

SAP AG 2005, XI Mapping Troubleshooting - 39

Difference of IB test mode and runtime execution


By default header parameters are used only in several built-in functions such as Sender, Receiver and Value Mapping. You can check if these functions are used using where used functionality

The probability that the mapping uses sender or receiver function is quite low. Value Mapping is used much more intensively.

SAP AG 2005, XI Mapping Troubleshooting - 40

Difference of IB test mode and runtime execution


To send mapping problems to SAP, it is important to send the following information:
mapping.xim file source payload target payload (if exist) XI message id that reveals this problem problem description

SAP AG 2005, XI Mapping Troubleshooting - 41

SAP XI Mapping Troubleshooting


Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Import/export the message mapping using file system Using sxmb_moni transaction to get a real payload Difference between IB test mode and real runtime ValueMapping, imported archives issues Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 42

ValueMapping, imported archives issues


If the mapping uses imported archives or ValueMapping usually it will be difficult to reproduce it at SAP for resolution. (Still it makes sense to provide as much information as possible because the problem may not be related with them) In case of performance problems, memory consumption issues or other questions, please send the source code for imported archive, unless it is some standard library like apache or jdbc driver one. To detect if the message mapping uses imported archives or special J2EE services one have to browse user-defined functions and check import sections. If the import section contains an import statement that does not start with com.sap or java thats a sign that the message mapping uses some third party coding which can cause the problem.

If the import statement contains com.sap.mw.jco.* it shows that the mapping uses JCo calls that can also cause performance problems if this function is executed too many times.

SAP AG 2005, XI Mapping Troubleshooting - 43

ValueMapping, imported archives issues


ValueMapping usually cause only performance issues. To detect if the ValueMapping is used in the mapping one can use WhereUsed functionality.

(just right click on the ValueMapping function)

SAP AG 2005, XI Mapping Troubleshooting - 44

SAP XI Mapping Troubleshooting

Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 45

Performance bottlenecks
Common reasons
Value mapping Sorting fields in user defined functions DB lookups in user defined functions RFC lookups in user defined functions

File size doesnt cause a performance problem for the Message Mapping itself (it might be a problem for XSLT or Java mapping). The processing time for 20 Mb source file is less than 40 sec for standard desktop hardware. Large files may cause problems for the whole infrastructure but message mapping processing time is not a bottleneck in this case. According to our customer feedback XI can process files of 120Mb including message mapping without problems within minutes.

Excluding the ValueMapping one can safely refer the performance problem as a consulting issue ( Consulting: Question on product or function/User error/Customizing)

SAP AG 2005, XI Mapping Troubleshooting - 46

Memory consumption
Keywords
java.lang.OutOfMemoryError this line always indicates that there is a memory consumption problem in the scenario.

Common reasons
Source payload size Target payload size User errors, imported archives

Usually when the message size is only 10Mb and still gets OutOfMemoryError. Then, in such cases the scenario might include the module processor that converts plain file into XML structure during AdapterEngine processing. After conversion the payload can grow up to 1020 times.

SAP AG 2005, XI Mapping Troubleshooting - 47

Memory consumption
Simple example
Plain text file:
Name;Firstname;Address;City;Country;Tel;Properties;Email Name;Firstname;Address;City;Country;Tel;Properties;Email Clooney;George;AnyStreet Clooney;George;AnyStreet 1;;USA;+01/23451/89876;;George.Clooney@emergency.room 1;;USA;+01/23451/89876;;George.Clooney@emergency.room Graham;Heather;;;;; Graham;Heather;;;;; Picard;Jean-Luc;Room next to the bridge of the USS Enterprise;;;;"He's the Picard;Jean-Luc;Room next to the bridge of the USS Enterprise;;;;"He's the Captain ofCaptain Enterprise !!!";Jean-Luc.Picard@enterprise.uss the USS of the USS Enterprise !!!";Jean-Luc.Picard@enterprise.uss

XML representation:

SAP AG 2005, XI Mapping Troubleshooting - 48

Memory consumption
Target payload size
Although the source payload can be relatively small, but the output file can be much larger. If the problem is occasional (sometimes the processing is successful and sometimes it fails) then it is necessary to check the input size/output size ratio based on successful mappings. If the scenario cant be processed successfully the message should be redirected to SAP support.

SAP AG 2005, XI Mapping Troubleshooting - 49

Memory consumption

Calculating the input/output file size ratio


Go to the test mode Upload the source payload as a test instance Run the mapping Holding CTRL+SHIFT keys right click on the source structure and choose Tree info menu item.

Perform the same operations with the target tree. Now you can compare the source and target file sizes

SAP AG 2005, XI Mapping Troubleshooting - 50

Problem types
Consulting Keywords:
how to mapping produces wrong result Cannot produce element exception result is empty mathematical/arithmetical operation errors StreamTransformationException

Design time problems Keywords:


integration builder hangs/doesnt respond <something> doesnt work Design time Internal error OutOfMemory problem <something> to slow

Runtime problems Keywords:


mapping is too slow OutOfMemory problem ClassNotFound exception

SAP AG 2005, XI Mapping Troubleshooting - 51

Runtime problems
Runtime problems checklist when sending problem to SAP Problem description XI SP number Mapping reference (SWC, SWCV, name, namespace) Exported mapping.xim file Source payload Target payload if the mapping produces wrong result ValueMapping, RFC, JCo calls being used. Include the source for the imported archives.

After including these information, the message should be forwarded to the SAP support.

SAP AG 2005, XI Mapping Troubleshooting - 52

Design time problems


Design time problems checklist when sending problem to SAP Problem description XI SP number Mapping reference (SWC, SWCV, name, namespace) Exported mapping.xim file

If the problem is reproducible with a different XI system this message should be forwarded to SAP support including all these data. If it is not reproducible with a different XI system it might be SP or client configuration problem.

SAP AG 2005, XI Mapping Troubleshooting - 53

Consulting messages
Consulting messages checklist Problem description If the problem concerns the mapping itself (how to map something or mapping produces wrong result or cannot produce element problem) Export existing mapping.xim file Source payload for testing desirable result description

SAP AG 2005, XI Mapping Troubleshooting - 54

Known issues
ValueMapping performance problem Changing the mapping type from 1:1 to split and merge mapping Copying message types namespace issue Big IDOCs design time performance problem Split&Merge mappings detecting a mapping problem Arithmetic operations errors.

SAP AG 2005, XI Mapping Troubleshooting - 55

ValueMapping performance problem


Workaround Create a user-defined function that caches ValueMapping results This is a simple function with one input argument
Map map = (Map) container.getParameter("cache"); if (map==null){ map = new HashMap(); container.setParameter("cache", map); } String res = (String) map.get(a); if (res!=null) return res; final String context = http://sap.com/xi/XI; final IFIdentifier src = XIVMFactory.newIdentifier(context, "srcAgency", "srcSchema"); final IFIdentifier dst = XIVMFactory.newIdentifier(context, "dstAgency", "dstSchema"); try { res = XIVMService.executeMapping(src, dst, a); map.put(a, res); return res; } catch (ValueMappingException e) { container.getTrace().addWarning("no ValueMapping found for ["+a+"]"); map.put(a, a); //reuse value if nothing found } return a;

Replace context string, srcSchema, dstSchema, srcAgency and dstAgency with those one used in the ValueMapping function Add com.sap.aii.mapping.value.api.* import statement Replace ValueMapping function with this newly created one

SAP AG 2005, XI Mapping Troubleshooting - 56

Changing the mapping type from 1:1 to N:M mapping


Changing messages types on the Messages tab causes loosing of all previously defined mapping. If one changes occurrences of the source or target message this message is wrapped with special predefined fields and after that the mapping is lost. Workaround Create a new mapping template based on mapping roots Change the message mapping signature Apply template mapping to your new structures

SAP AG 2005, XI Mapping Troubleshooting - 57

Copying message type namespace issue


The problem:
After copying scenario to another namespace the mapping uses old namespace in its structure.

It is designed behavior and not a bug. After copying of the message type the namespace of the new message type is inherited from the old object. You need manually to change the namespace of the new object.

Before copying

After copying

Change this namespace to the new one.

SAP AG 2005, XI Mapping Troubleshooting - 58

Big IDOCs
The problem:
If the IDOC structure is large enough the Mapping needs up to 10-30 seconds to load it depending on the hardware.

The solution:
Since SP12 there is a new function export reduced IDOC structure If the big IDOC causes a problem in design time you can use reduced IDOC schema. Export the IDOC to the file system Use this IDOC as source or structure for the message mapping (this function only removes documentation from schema. Sometimes the documentation can consume several times more memory than the structure itself)

SAP AG 2005, XI Mapping Troubleshooting - 59

Split and Merge mappings.


The problem: During merge mapping the mapping runtime uses self-created new structure which contains special tags like Message1, Message2, etc. This merged payload is not displayed in the message monitor and if the customer has several hundreds of messages as a source and the mapping runtime throws an exception there is no way to validate the merged payload and one have to validate each message one by one.

The most sensible solution is to install the latest support package. Since SP16 mapping tool shows the full path of the field that causes a problem in the runtime. Using this information it is more or less obvious in which source payload the problem occurred.

SAP AG 2005, XI Mapping Troubleshooting - 60

Arithmetic operations
The problem: When using standard functions for adding, subtracting or multiplying values, the result is usually truncated. As the mapping runtime uses float java type for built in arithmetic functions, and this is a restriction of the java platform. The workaround: To make precise calculations, a user-defined function needs to be created which will use a BigDecimal class. For instance the add function can look this way: SP18 (Note 958486)
public String add(String a, String b){ BigDecimal first = new BigDecimal(a); BigDecimal second = new BigDecimal(b); //first.subtract(second).toString(); //first.multiply(second).toString(); return first.add(second).toString(); }

SAP AG 2005, XI Mapping Troubleshooting - 61

SAP XI Mapping Troubleshooting

Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 62

XSLT vs. Message Mapping


There is no official data regarding this issue because the message mapping tool is not a competitor for the XSLT engine. Although it maps XMLs the idea is completely different. Message mapping needs a target structure in design time and always produces valid XML. XSLT can transform XML into other formats, e.g. plain text file. Still we have unofficial data from our customers who made some researches in this area. Similar message mapping and XSL stylesheet were used for testing. The results are:
The message mapping is comparable in performance to XSLT engine for small files. The message mapping processing time is linearly dependent on the file size. The XSLT mapping processing time progressively grows with the file size. For structure lookup in mapping, XSLT offers XPath expressions which are easy to use but for large files it causes big performance problems. Message Mapping uses other paradigm with queues and therefore it forces user to write mappings in efficient way) For 1 to 1 copy mapping, message mapping is 5-10% slower than XSLT, depending on the structure. For the mapping with some processing (field names are changed, functions are used, etc.), in normal scenarios, message mapping is 5-10% faster then XSLT for file sizes up to several megabytes. Depending on the use case, message mapping is either faster or comparable to XSLT engine.

SAP AG 2005, XI Mapping Troubleshooting - 63

XSLT vs. Message Mapping


The average processing time for the customer scenario graph:

SAP AG 2005, XI Mapping Troubleshooting - 64

XSLT vs. Message Mapping


Memory consumption
XSLT mappings up to 40MB files are processed successfully XI Message Mappings 120MB was processed successfully. Then the Adapter Engine (file adapter) encountered a problem with the message size. For XI Mappings the memory consumption also depends on the usage of Context to Context and Queue to Queue functions. If such functions are used then the whole source structure must be parsed before starting the mapping. Otherwise the message mapping works in streaming mode (record to record) which needs only up to 10-20 megabytes of memory. Still the recommendation is to not use files larger than 20 MBs. If the source payload is larger, then it is better to use the message split scenario. It might be that there are some other jobs processing in the same J2EE engine and it is a bad practice to load the engine completely with one scenario.

SAP AG 2005, XI Mapping Troubleshooting - 65

SAP XI Mapping Troubleshooting

Mapping Overview and Service Mapping during Runtime Mapping Troubleshooting Common Problems XSLT vs. Message Mapping Multi Mapping

SAP AG 2005, XI Mapping Troubleshooting - 66

Message Splits
There are different ways to do message splits: You can configure more than one inbound interface in the Interface Determination. In this case, there is no multi mapping involved. You can use a transform step in the BPE to split (or merge) messages. Multi-mappings can be used to split messages in the pipeline.

SAP AG 2005, XI Mapping Troubleshooting - 67

Several Inbound Interfaces Configuration

SAP AG 2005, XI Mapping Troubleshooting - 68

Several Inbound Interfaces Runtime

Outbound

Mapping 1

Inbound 1

Message Split Interface Determination Outbound

Outbound

Mapping 2

Inbound 2

Outbound

Mapping 3

Inbound 3

SAP AG 2005, XI Mapping Troubleshooting - 69

Split mapping in pipeline Configuration (SP 14)

SAP AG 2005, XI Mapping Troubleshooting - 70

Split mapping in pipeline Runtime (SP 14)

Inbound 1 Interface Determination No Message Split

Split Mapping S

Split Mapping S

Split Mapping

Determines a split mapping, but no receiver interfaces. The receiver interface is set to a constant (InterfaceCollection).

Inbound 2

The result messages of the split mapping are bundled into a socalled bulk message. Therefore all these messages must be sent to the same adapter engine, and there are restrictions regarding the adapter type.

Bulk message

SAP AG 2005, XI Mapping Troubleshooting - 71

Split mapping in pipeline Interface names


Bulk message InterfaceCollection Interface A

Interface B

Even the bulk mesage has a message header and therefore an interface name. As the child messages can have different interfaces, there is no canonical candidate for the interface of the bulk message. Therefore, bulk messages always have a constant interface name (InterfaceCollection).

Interface C

In case of only one result message, we create an ordinary message, not a bulk with only one child message.

Known Issue: Note 878943 The name of the receiver interface is wrong if the split mapping produces only one result message.

SAP AG 2005, XI Mapping Troubleshooting - 72

BPM Trace

Transaction SWI1

SAP AG 2005, XI Mapping Troubleshooting - 73

BPM Trace continued

SAP AG 2005, XI Mapping Troubleshooting - 74

BPM Trace
OSS Message 184279 2006: Table SMPPXLOG is growing...
Mapping traces in the BPM are stored in table SMPPXLOG. An event to delete these traces was not fired. As a consequence, the table was growing. The issue is solved in note

930354.

SAP AG 2005, XI Mapping Troubleshooting - 75

Multi XML Format

SAP AG 2005, XI Mapping Troubleshooting - 76

Multi XML Format

XI part

application part

SAP AG 2005, XI Mapping Troubleshooting - 77

Split mapping internally

Split Multi XML Create Multi XML

Mapping

SAP AG 2005, XI Mapping Troubleshooting - 78

Split mapping internally

IS Pipeline / BPE

XI message with normal payload

Mapping Runtime
Create Multi XML Split Multi XML Multi XML multi multi

Mapping

Application Mapping

SAP AG 2005, XI Mapping Troubleshooting - 79

OSS Message 944218 2005


Payload of XI message is already in multi XML format. IS Pipeline / BPE

multi

Mapping Runtime
Create Multi XML Split Multi XML

XI message with normal payload expected, but the source XML is already in multi XML format.

multi multi

Mapping

Application Mapping

SAP AG 2005, XI Mapping Troubleshooting - 80

OSS Message 1686867 2005


BPM: Transformation step and N:1 XSLT mapping does not work BPE

Mapping Runtime
Create Multi XML Split Multi XML

multi

Mapping

Multi XML expected, but the customer mapping produced ordinary XML. Afterwards, the split failed.

Application Mapping

SAP AG 2005, XI Mapping Troubleshooting - 81

Multi Mapping Sequences

IS Pipeline / BPE

Multi Mappings consisting of a sequence of steps did not work. Solved in note 842070. Only the first step of the sequence was executed.

Mapping Runtime
Create Multi XML Split Multi XML

multi

multi

Mapping

Application Mapping

SAP AG 2005, XI Mapping Troubleshooting - 82

Your Turn!

Q&A
William Li
william.li@sap.com

SAP AG 2005, XI Mapping Troubleshooting - 83

Copyright 2005 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, Outlook, and PowerPoint 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, and Informix are trademarks or registered trademarks of IBM Corporation 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. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver 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 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.
SAP AG 2005, XI Mapping Troubleshooting - 84

Вам также может понравиться