Topic
No replies
SystemAdmin
SystemAdmin
6184 Posts
ACCEPTED ANSWER

Pinned topic WTX Iterate on Segement/Loop

‏2013-04-01T14:15:22Z |
Hi, I am trying to convert one IDOC into the XML message. IDOC contains segments multiple times. like below:-

Payload
Group1
SegmentX
SegmentY
GROUP1
SegmentX
SegmentY
.....................
...
Now I have to go inside into the the each Group1and get the value of SegmentX each time in WTX and map that value into the xml like:-
<LINE_NBR type="">00021</LINE_NBR> so basically line number will come multiple times.

Now when I have created one functional map... like this
=EDPLOOP(Group1:Payload)
its just takeing values from 1st Group.

But when I changed it to
=EDPLOOP(Group1[2]:Payload)
its give me tha value of the second segment.

I dont know how to traverse on to each Group one by one. I tried this option as well:-

=EDPLOOP(Group1INDEX($):Payload) but wtx gives error saying rule is not valid.
Please help. Please let me know if any details require from my end.