Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Mapping issue 2

Source

><body>

> <mes>

> <ta>A</ta>

> <detail>

> <val>0030</val>

> <val>0033</val>

> <val>0030</val>

> <val>0030</val>

> </detail>

> </mes>

> <mes>

> <ta>B</ta>

> <detail>

> <val>0040</val>

> <val>0043</val>

> <val>0044</val>

> </detail>

> </mes>

></body>

target should be - repeat MAIN per unique val and GR = ta(source) (and of course, each main node must contain "its" TA value

><whole>

> <main>

> <gr>A</gr>

> </main>

> <main>

> <gr>A</gr>

> </main>

> <main>

> <gr>A</gr>

> </main>

> <main>

> <gr>B</gr>

> </main>

> <main>

> <gr>B</gr>

> </main>

></whole>

Nay idea, how to do this one?

Thnaks,

Olian

Edited by: Olian Saludew on Sep 1, 2008 2:04 PM

Former Member
replied

Hi Olian,

For the target main:

<val> --> <removeContext> --> <sort> --> <splitByValue: ValueChanged> --> <collapseContext> --> <main>

For the target gr:

I'm assuming that the context for ta is: A, contextChange, B

I'm assuming that the context for val is: 0030, 0033, 0030, 0030, contextChange, 0040, 0043, 0044

1. <val> CONCAT with [ <ta> UseOneAsMany <val> <val> ] , the output should be 0030A, 0033A, 0030A, 0030A, 0040B, 0043B and 0044B

2. output of step 1 --> <removeContext> --> <sort: lexicographical> --> <splitByValue: Value Changed> --> <collapseContext> --> <subString: 4, 1>...so the output should only be letters A or B (assuming my substring numbers are correct) with the duplicates removed

As for the value, the same step like main is followed.. hope this helps

Edited by: dspboys on Sep 2, 2008 7:26 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question