on 01-05-2007 5:14 PM
Dear all,
I am making a message mapping with two structures:
Source:
UF
CNF
I am creating a target message that will have a initial tag ( at the end of line if I don´t have this field ?
Thanks,
Regards,
Fernando
Hi,
<i>How can I concatenate the fields to only one line without lost the tag control?</i>
You could use the 'constant' function(from the available list of functions in the mapping editor) to generate the tags.
<item><cUF>43</cUF><cNF>137530928</cNF></item>.
1st function concatenate:
-
1st input: <item> field
-
2nd input: const <cUF>
2nd function concatenate:
-
1st input: output of '1st function concatenate'
-
2nd input: substring(0,2)
3rd function concatenate:
-
1st input: output of '2nd function concatenate'
-
2nd input: const </cUF>
4th function concatenate:
-
1st input: output of '3rd function concatenate'
-
2nd input: const <cNF>
5th function concatenate:
-
1st input: output of '4th function concatenate'
-
2nd input: substring(2,10)
6th function concatenate:
-
1st input: output of '5th function concatenate'
-
2nd input: const </cNF>
7th functon concatenate:
-
1st input: output of '6th function concatenate'
-
2nd input:constant </item>
Hope this helps.
Regards,
Smitha.
Message was edited by:
Smitha Rao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You could use Java mapping in that case.
Take the source <cUF> and <cNF> nodes as input(arrays) and carry out the processing.
String finalString="";
for(int j=0;j<cUF.length;j++)
{
finalString = "<cUF>"cUF[j]"</cUF>""<cNF>" cNF[j]+"</cNF>";
result.addValue(finalString);
}
I have assumed here, that cUF and cNF have the same occurence.
Regards,
Smitha.
Hi,
Wats your target structure?
Is that only has 'item' element?
Am still not clear on your requirement.
If am correct, you need <item><cUF>43</cUF><cNF>137530928</cNF></item> as your output and you have only 'item' element in the target structure.
If you need to get source element name for mapping you need to go for Java mapping. You cannot do that in graphical mapping.
Your requirement can be easily done using Java Mapping.
Regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernando,
Concatenate UF and ( Output of Substring(0,2) of item)
then Concatenate this Output to NF
then this is Output with (Output of Substring(2,9) of Item)
Cheers
Nagesh.....
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 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.