cancel
Showing results for 
Search instead for 
Did you mean: 

Message Splitting

former_member188791
Participant
0 Kudos

Hi Group,

We have the below requirement,can any body help:

The incoming XML message needs to split based on 3 header fields combination (if any one of these changes needs to create new file) using Java mapping:

Source:

<?xml version="1.0" encoding="UTF-8"?>
<XML_DATA>
<Intdat>
<HEADER EMP = "EDNI,A,Aus"
</HEADER>
<Record>
<toi i1= "11"> </toi>
<toi i1= "12"> </toi>
<toi i1= "13"> </toi>
</Record>
</Intdata><Intdat>
<HEADER EMP = "PTA,A,US"
</HEADER>
<Record>
<toi i1= "21"> </toi>
<toi i1= "22"> </toi>
<toi i1= "23"> </toi>
</Record>
</Intdata>
<HEADER EMP = "EDNI,A,Aus"
</HEADER>
<Record>
<toi i1= "31"> </toi>
<toi i1= "32"> </toi>
<toi i1= "33"> </toi>
</Record>
</Intdata>
<HEADER EMP = "EDNI,B,Aus"
</HEADER>
<Record>
<toi i1= "41"> </toi>
<toi i1= "42"> </toi>
<toi i1= "43"> </toi>
</Record>
</Intdata>
<\XML_DATA>

Target:

Target File Name: EDNI_A_AUS.csv

EDNI,A,AUS,11,12,13
EDNI,A,AUS,31,32,33

Target File Name:PTA_A_US.csv

PTA,A,US,21,22,23

Target File name : EDNI_B_AUS.csv

EDNI,B,AUS,41,42,43

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You need to build the following logic in your mapping -

Concatenate the keys field values within <Record> and compare the comination with other records.

If the combination is not same, then create message.

You can acheive this in graphical mapping using concat and SplitByValue(value change) functions.

Former Member
0 Kudos

Hi,

please go throuh below blog.

http://wiki.sdn.sap.com/wiki/display/XI/Multi-MappingusingJava+Mapping

i think with out java mapping we can do this, i am not sure,

Follow the below steps to achieve your requirement.

1. You need to provide occurance of the field to be 1..Unbounded.

2. Do the mapping according to the requirement.

3. In the Receiver Determination, you need to select " Extended" in the Type of Receeiver determination.

regards,

ganesh.

former_member188791
Participant
0 Kudos

Hi Ganesh,

Thnak you for your reply.

I want to achieve this by using Java Mapping,can any body help.

Regards,

Rajiv

former_member188791
Participant
0 Kudos

Hi Group,

Can any body help with this requirement.