on 10-24-2007 1:29 PM
Hi,
How to get 1 , 2 and 3rd occurance value?
ex:Source
-
E1EDP10
E1EDP16
a
b
c
Whenever E1EDP16 repeates (duplicate segments are there). Once I need to send in target element the 1st occurance of E1EDP16/a value, send time I need to send the send occurance of E1EDP16/a value, and as on...
How to achive this.
regards,
Ansar.
I will clarify more...
my source structure is like this:
-
E1EDP10
E1EDP16
a
b
c
E1EDP16
a
b
c
E1EDP16
a
b
c
My Target structure:
-
SEG1
SEG2
X
Y
Z
-- Here I need to send from E1EDP16 /a (source) value to SEG2/X (target).
here E1EDP16 repeats 3 times..Now I want to send only 2nd time of E1EDP16/a value to target. How to achive this.?
thx in adavnce...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If this is your
Source structure :
E1EDP16
a
b
c
E1EDP16
a
b
c
E1EDP16
a
b
c
and you want to create target structure as...
Target Stucture
SEG2
X
Y
Z
SEG2
X
Y
Z
SEG2
X
Y
Z
....
If this is what you want map E1EDP16 to SEG2
E1EDP16>a to SEG2>x
E1EDP16>b to SEG2>y
E1EDP16>z to SEG2>z
In this case corresponding values will be mapped to respective occurences
Message was edited by:
Yomesh P Sharma
This can be done by using a UDF.
Provide complete queue of source to UDF, have a for loop which loops through the queue and takes only second value and fills it in resultlist. Pass the result to your target..
example ......
getSecondValue(sourcefield)
{
for(source=0; source <= 1; source ++ )
{
result = sourcefield[1];
}
}
Hi Ansar,
You want to map multiple occurence of source node to target node. For this only prerequisite is your target Node should also be 0..unbounded occurence.
If this is true then just map E1EDP16 directly to target node. XI mapping works on queues, the queue of E1EDP16 will have all the value with context change. The same queue will be use to create target node. Hence you will get multiple target nodes.
Regards,
Yomesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What exactly u need? if u want occurence value then,u can only set 0..1 or 1..1 or 0..Unbounded only.if u want the occurence as 0..3 will not be possibe.give the occurence as 0..unbounded and it will occur how mnay times the source value will come.
Regards,
Phani
Reward Points if Helpful
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 | |
10 | |
10 | |
7 | |
6 | |
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.