on 2013 Oct 18 9:55 AM
Hi!
I have the following Problem and would like to know if there is an elegant solution to it!
I want to map the Output of a function block to an XML structure. So there is nothing so Special about it
The Problem is the following:
In the source structure there are 2 tables:
Table1:
Field 1, Field 2
xyz 001
abc 002
Table2:
Field 1, Field 2, Field 3
mno abc 001
abc xyz 001
xyz ako 002
A part of the target structure of the XML Looks like this:
<Tag1>
<Subtag 1>001</Subtag1>
--> Here All entries from Table 2 whose Field 3 corresponds to Field 2 of Table 1 should be placed!!
<Tag2>
<Subtag2>mno</Subtag2>
<Subtag3>abc</Subtag3>
</Tag2>
<Tag2>
<Subtag2>abc</Subtag2>
<Subtag3>xyz</Subtag3>
</Tag2>
<Subtag 1>002</Subtag1>
<Tag2>
<Subtag2>xyz</Subtag2>
<Subtag3>ako</Subtag3>
</Tag2>
</Tag1>
Is there a solution to this by a graphical mapping?
BR, EF
Request clarification before answering.
At the Moment i tried the following, but it doesn't work ... the mapping does not put the Suggestion_options under the corresponding order_suggestion!
In the mapping, i check if the suggested_line fields are equal. If so, i try to put the whole order_suggestion_option element to the corresponding order_suggestion_option in the target structure ...
Here is the momentarily wrong result of the mapping ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
I tried to realize your solution and it Looks better, but not entirely ...
Test data is the following:
<ORDER_SUGGESTION>
<item>
<X_SUGGESTION_ID/>
<DESCRIPTION/>
<SUGGESTED_LINE>100</SUGGESTED_LINE>
</item>
<item>
<X_SUGGESTION_ID/>
<DESCRIPTION/>
<SUGGESTED_LINE>200</SUGGESTED_LINE>
</item>
</ORDER_SUGGESTION>
<ORDER_SUGGESTION_OPTION>
<item>
<X_FEATURE_ID>1-1</X_FEATURE_ID>
<OPTION>1-1</OPTION>
<SEQUENTIAL_NO>1-1</SEQUENTIAL_NO>
<SUGGESTED_LINE>100</SUGGESTED_LINE>
</item>
<item>
<X_FEATURE_ID>2-1</X_FEATURE_ID>
<OPTION>2-1</OPTION>
<SEQUENTIAL_NO>2-1</SEQUENTIAL_NO>
<SUGGESTED_LINE>200</SUGGESTED_LINE>
</item>
<item>
<X_FEATURE_ID>1-2</X_FEATURE_ID>
<OPTION>1-2</OPTION>
<SEQUENTIAL_NO>1-2</SEQUENTIAL_NO>
<SUGGESTED_LINE>100</SUGGESTED_LINE>
</item>
<item>
<X_FEATURE_ID>2-2</X_FEATURE_ID>
<OPTION>2-2</OPTION>
<SEQUENTIAL_NO>2-2</SEQUENTIAL_NO>
<SUGGESTED_LINE>200</SUGGESTED_LINE>
</item>
</ORDER_SUGGESTION_OPTION>
But, there are items missing in the Output! Items 1-2 and 2-2 are missing at Level 100 or 200 ...
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.