cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping Split source structure

Former Member
0 Kudos

Hi All

I have a scenario,in which below are my target and source structure

how can we achieve this from message mapping

My source data contains multiple line items

Each item tag contains a parameter ZSECTION which has values (10, 20 or so on). I want to club these item values as SCETION tag in target structure

e.g Source

<E_PRTAB>

<item>

<ZSection>10</zsection>

<text>abcd</text>

</item>

<item>

<ZSection>10</zsection>

<text>second item under a scetion</text>

</item>

<ZSection>20</zsection>

<text>abcd</text>

</item>

<ZSection>20</zsection>

<text>abcddskfsd</text>

</item>

<E_PRTAB>

Target Structure:

<section>

<name>10</name>

<includedInTotal>0</includedInTotal>

<parameterList/>

<parameter>

<description>abcd<description>

</parameter>

<parameter>

<description>second item under a scetion<description>

</parameter>

</section>

<section>

<name>20</name>

<includedInTotal>0</includedInTotal>

<parameterList/>

<parameter>

<description>abcd<description>

</parameter>

<parameter>

<description>abcddskfsd<description>

</parameter>

</section>

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190293
Active Contributor
0 Kudos

Hi Hasan!

Mapping:

Please note that elements "ZSection" and "text" are in context of "E_PRTAB".

Result:

Regards, Evgeniy.

former_member186851
Active Contributor
0 Kudos

Hello Hasan,

Try with the below logic

ZSECTION-----removecontexts------Sort----CollapseContexts-----SpiltByValue(EachValue)------Section

Text--------Parameter

Text---------removecontexts----------------------------------------
                                                                                                             use one as many-----description

ZSECTION-----removecontexts------Sort----SpiltByValue(EachValue)-----

bhagya_nayanala
Explorer
0 Kudos

Hi Raghu

After sort function and before to CollapseContexts you have use SplitByValue(Value Change).

Regards

Bhagya

former_member186851
Active Contributor
0 Kudos

I dont think So Bhagya,

Let him try and get back to us.

former_member190293
Active Contributor
0 Kudos

Hi Bhagya!

It seems that you're right. Remove contexts -> all items in one context -> CollapseContexts -> one value in queue.

Regards, Evgeniy.