on 03-24-2008 9:27 AM
Hi,
I have a scenario where in the source stycture is as:
<seg1>
<a></a>
<b></b>
</seg1>
<seg2>
<a></a>
<b></b>
</seg2>
<seg3>
<a></a>
<b></b>
</seg3>
<seg4>
<a></a>
<b></b>
</seg4>
<seg5>
<a></a>
<b></b>
</seg5>
and target structure as,
<Header>
<a></a>
<b></b>
</Header>
<Body>
<a></a>
<b></b>
</Body>
<Line>
<a></a>
<b></b>
</Line>
Here I need to map
seg1 to Header,
seg2 to Body,
seg3,seg4 and seg5 needs to map to Line.
So how to achieve this as I am able to assign only one seg at a time to Line.
Please provide your valuable suggestions/ideas.
duplicate <Line> segment in target structure. and then map <Seg3>,<Seg4> and <Seg5> individually to the seperate <Line> segments
Edited by: Kausik M on Mar 24, 2008 10:44 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi check the below link for reference
note: reward points if found helpfull
regards
chadrakanth.k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For this type of mapping you can opt XSLT mapping
assume source.xml contains
<source>
<seg1/>
<seg2/>
<line1/>
<line2/>
<line3/>
</source>
target.xml contains
<target>
<header>seg1</header>
<body>seg2</body>
<line>
<line1>line1</line1>
<line2>line2</line2>
<line3>line3</line3>
</line>
</target>
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<source>
<!-- iterate on each group -->
<xsl:variable name="header">
<xsl:value-of select="$source/seg1"/>
</xsl:variable>
<xsl:variable name="body">
<xsl:value-of select="$source/seg2"/>
</xsl:variable>
<xsl:variable name="line">
<xsl:value-of select="$source/line1"/>
<xsl:value-of select="$source/line2"/>
<xsl:value-of select="$source/line3"/>
</xsl:variable>
<!-- Generate the final XML file -->
<target>
<Header>
<xsl:value-of select="$header"/>
</Header>
<Body>
<xsl:value-of select="$body"/>
</Body>
<Line>
<xsl:value-of select="$line"/>
</Line>
</target>
</xsl:template>
</xsl:stylesheet>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please have a look at the following link.
/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
Refer --N to 1 Mapping using XSLT
Thanks
Swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let me understand ur requirement in little bit more detail:
as per your explanation you need to create 3 diff. messages having the same Header and Body but different Line items right?
Ranjit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Multi-mapping and BPM (integration process) always use to go hand-in-hand. Since SPS14, this isnt true anymore. In the case of message splits (1:n transformations), multi-mappings can now be created and used in non-BPM scenarios. Referred to in many different ways, but most commonly as mapping-based message splits, this new enhancement affords SAP NetWeaver XI developers an opportunity to take BPM out of the equation for message split based scenarios.
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible without BPM
Regards
Aashish Sinha
PS : reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this Logic
/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
Regards
Seshagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.