on 07-29-2013 5:43 AM
Hi everybody,
I've got a not so complex task but still I can't get the mapping done. The Incoming file is a xml document with a very flat hierarchy. Also it is just one context, so no context change within the mapping. What needs to be done is, that the target strcuture needs to be a map with the key and vale entries of the source file. I've tried to make it a liitle bit more visual:
The source field are optional and therefore I can not just create a target datatype with all the possibilities, as the source file can have 1 up to 30 entries.
I've tried to access the incoming message in a udf and the build the regarding map. But I had no luck there. Can anyone of you provide some help?
regards
Chris
I've solved this problem by myself. As solution I simply cloned the output structure via a mapping as often as needed via a UDF that checks if the orginal field value, on which the target nodes should be created exists.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
Are the key/value combinations not pulling through the values at all?
How I would do it is:
Create add a variable [keyValData] with the example mapping
<a>-<1> -> *keyValData
Then for the key/value pair
*keyValData -> Key
*keyValData -> Value
This logic is based your picture showing that the key and value are sharing a source field.
Note: In this case you would not need a UDF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortenuatley not. They are just insert in the source structure. But in the target structure I need a entry in the map based on every entry.
Treasure Mathala wrote:
Hey,
This logic is based your picture showing that the key and value are sharing a source field.
Note: In this case you would not need a UDF.
The name of the node needs to be the key-entry an it's value needs to be within the value:
<a>sample_1</a>
<b>sample_2</b>
needs to become
<map>
<key>a</key>
<value>sample_1</value>
<key>b</key>
<value>sample_2</sample>
</map>
regards
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi chris,
follow this link same as 7.31 also http://scn.sap.com/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-l...
it use full to u
Thanks
srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.