on 06-21-2006 12:06 PM
Dear All,
i have a file to idoc scenario where my input file has the structure
<p1>
material
value1
value2
value3
</p1>
and the target idoc has structure
<E2>
material
<E3>
VALUE
<\E3>
<E2>
i am mapping p1 to E2. and i want for all the value field E3 segment should repeat itself
so i want the result like
<E2>
MATERIAL
<E3>
VALUE1
<\E3>
<E3>
VALUE2
<\E3>
<E3>
VALUE3
<\E3>
<\E2>
is this possible using a user defined fucntion. How can i acheive this target structure with desired values.
Hey
this can be done through a user defined function
first for every occurance of value,E3 has to occur
So write a userdefined function with a,b and c as arguments with respect to the values value1,value2 and value3 and select the context in the function
write the code as
if(!a[0].equals(null))
{
result.addValue(a[0]);
}
if(!b[0].equals(null))
{
result.addValue(b[0]);
}
if(!c[0].equals(null))
{
result.addValue(c[0]);
}
and map the output from the userdefined function to E3.
similarly for every E3 u need the VAlUE to occur,So repeat the same user defined function with the same inputs and map the output of the user defined function to node function <b>split by value</b> and then map it to the ouptu VALUE.
regards
jithesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do this using
Have a look at this pdf for eg
slide 28
Regards
Vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sorabh,
Do you really want to use a udf? You can achieve this with the help of node functions. Use the node function "remove context' to achieve this.
Regards,
Sushumna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.