on 05-20-2014 11:16 PM
Hi All,
I have a source structure 1..unbounded
<Material>
<row> 1....unbounded
<Mat_ID>123<Mat_ID>
<Desc><text</Desc>
<uom>EA</uom>
<plant>AB</plant>
<org>XY</org>
</row>
<row>
<Mat_ID>123<Mat_ID>
<Desc><text</Desc>
<uom>ST</uom>
<plant>CD</plant>
<org>FG</org>
</row>
<row>
<Mat_ID>123<Mat_ID>
<Desc><text</Desc>
<uom>XY</uom>
<plant>DE</plant>
<org>ZX</org>
</row>
</Material>
Target Structure
<Material>
<row> ---> 1....unbounded
<Mat_ID>123<Mat_ID>
<Desc><text</Desc>
<uomdata> ---> 0 ----unbounded
<uom>EA</uom>
<uomdata>
<uomdata>
<uom>ST</uom>
</uomdata>
<uomdata>
<uom>XY</uom>
</uomdata>
<plantdata> ----> 0 ----unbounded
<plant>AB</plant>
</plantdata>
<plantdata>
<plant>CD</plant>
</plantdata>
<plant>DE</plant>
</plantdata>
<orgdata> ----> 0 ----unbounded
<org>XY</org>
</orgdata>
<orgdata>
<org>FG</org>
</orgdata>
<orgdata>
<org>ZX</org>
</orgdata>
</row>
</Material>
How do I do message mapping (preferably graphical mapping) to achieve the target structure. The values of each elements are manipulated for easiness. There are more than one fields under each node in real scenario. Please let me know
thx
mike
Hello,
Check below mapping
1) Change the context of Id field and set the same at "Material" level
2) Mapping of Desc field
-> Change the context of Id field (same as step 1)
-> Change the context of Desc field and set the same at Material level
3) Mapping of UOMdata node and UOM field
-> Only, change the context of Id field (Same as step 1)
In a similar fashion (Same as shown in step 3) , complete mapping for Plant node
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Beautiful..Thx...
I will try out and let you know Amit
One more request.
I have to do this mapping first and use it in receiver interfaces of ICO using an operation mapping and inbound interface as usual.
Now, I have to add 2 more inbound interfaces in the receiver interfaces and maintain order at Runtime to execute the above mapping first always and then execute the 2 additional inbound interfaces based on some condition.
The condition has to be something like this (source structure <flag> field value dependent condition)
/Material/row/flag = 'N' call the second inbound interface to execute a operation mapping
/Material/row/flag = 'N' call the third interface to execute another operation mapping
Now the complexity here is:
If the source structure is like this below
<Material>
<row> 1....unbounded
<Mat_ID>123<Mat_ID>
<Desc><text</Desc>
<uom>EA</uom>
<plant>AB</plant>
<org>XY</org>
<flag>N</flag> -- this is the flag field for the first material
</row>
<row>
<Mat_ID>123<Mat_ID>
<Desc><text</Desc>
<flag>N</flag> -- this is the flag field for the first material again
<uom>ST</uom>
<plant>CD</plant>
<org>FG</org>
</row>
<row>
<Mat_ID>345<Mat_ID>
<Desc><text</Desc>
<flag>N</flag> --this is the flag field for the second material
<uom>XY</uom>
<plant>DE</plant>
<org>ZX</org>
</row>
and so on
</Material>
The target structure for the additional 2 inbound interface are shown below
2nd inbound interface target structure
<Material>
<Mat_ID>123</Mat_ID>
<flag>N</flag> - constant value 'N'
<Mat_ID>345</Mat_ID>
<flag>N</flag> - constant value 'N'
</Material>
3rd inbound interface target structure
<Material>
<Mat_ID>123</Mat_ID>
<flag>Y</flag> - constant value 'Y'
<Mat_ID>345</Mat_ID>
<flag>Y</flag> - constant value 'Y'
</Material>
first question: how do I write a condition for checking the source structure <flag> field value for every unique material ?
second question: what would be the message mapping and operation mapping for the 2nd and 3rd inbound interfaces?
thx
mike
Amit,
I dont think this is working. I just did for ID and it duplicated the target structure
Change the context of Id field and set the same at "Material" level - This is the step I did and tested the message mapping. The target structure seems to be repeating for same material ID
Test:
<Material>
<row> 1....unbounded
<Mat_ID>123<Mat_ID>
--
</Material>
<Material>
<row> 1....unbounded
<Mat_ID>123<Mat_ID>
--
</Material>
When message mapping is executed,
result:
<Material>
<row> ---> 1....unbounded
<Mat_ID>123<Mat_ID>
...
</Materail>
<Material>
<row> ---> 1....unbounded
<Mat_ID>123<Mat_ID>
--
</Material>
I dont want the target structure to be repeated if the value is same which is the whole purpose of posting the question here
I didn't try Description or UOM because this itself is not working as it looks like
thx
mike
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.