on 08-20-2010 10:25 AM
Hi,
My input structure ha
<product>
<finishing_Product>
<Component_Product>
</Product>
My output structure
<item>
<code>
</item>
My input file has
finishing_prouct = A91 and component_product = B91
finishing_prouct = A91 and component_product = B92
finishing_prouct = A92 and component_product = B81
finishing_prouct = A91 and component_product = B93
but i need output has
<item>
<code> A91</code>
</item>
<item>
<code>b91</code>
</item>
<item>
<code>b92</code>
</item>
<item>
<code>b93</code>
</item>
<item>
<code>A92</code>
</item>
<item>
<code>b81></code>
</item>
i.e. first i need to sort Finishing product then i need to display every component product in that finishing product.Please tell me how would we do this in message mapping.
Thanks,
Enivas.
Hi Nivas,
Use remove context and SplitByValue(Value Change) , collapseContext, node functions . you can achieve this functionality very easily..
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for all ur replies.
But my target structure is different.
Please look at my target message its is different.
I am unable to get the required output. when am trying. Please help me on this isssue.
Advance thanks for your valuable time.
Sreenivas.
Edited by: enivas on Aug 20, 2010 12:55 PM
Here is the UDF Code and mapping steps screen shots with test result..
UDF Link: http://www.flickr.com/photos/23639237@N02/4909850131/sizes/l/in/photostream/
Item mapping: http://www.flickr.com/photos/23639237@N02/4909853307/sizes/l/in/photostream/
Code mapping: http://www.flickr.com/photos/23639237@N02/4910456070/sizes/l/in/photostream/
Test results: http://www.flickr.com/photos/23639237@N02/4909857153/sizes/l/in/photostream/
int count1 = 0;
for(int i = 0; i < a.length; i++)
{
result.addValue(a<i>);
for(int j = count1; j < b.length; j++)
{
if(b[j].equals(ResultList.CC))
{
count1 = j + 1;
break;
}
result.addValue(b[j]);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you will have to use the sortbyKey Standard function to help you out.
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
Just do a search in SDN to find how that function has been used for similar scenarios
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.