Author |
Message
|
stunned |
Posted: Mon Apr 01, 2013 4:11 am Post subject: WTX Iterate on Segement/Loop |
|
|
Newbie
Joined: 06 Mar 2012 Posts: 7
|
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(Group1[INDEX($)]:Payload) but wtx gives error saying rule is not valid.
Please help. Please let me know if any details require from my end. |
|
Back to top |
|
 |
stunned |
Posted: Mon Apr 01, 2013 4:49 am Post subject: |
|
|
Newbie
Joined: 06 Mar 2012 Posts: 7
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 01, 2013 4:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
stunned wrote: |
Any Update |
In 30 minutes? On Easter Monday?
What do you think this is, a help desk? If you need help that urgently, IBM have a help desk you can use.
I'd say you have to use one of the loop constructs myself, and for all bar the simplest IDocs you might find ESQL more manageable than mapping. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
stunned |
Posted: Mon Apr 01, 2013 5:04 am Post subject: |
|
|
Newbie
Joined: 06 Mar 2012 Posts: 7
|
Happy Easter Grand poobha...
Well I have a constraint to use the WTX. So all you are saying is I have to construct my own function to iterate over segments. Does WTX dont provide any. what your experience saying?
I am very much new to WTX soo ur words will be of great help to me...
Thanks a lot. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 01, 2013 5:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
stunned wrote: |
Well I have a constraint to use the WTX. So all you are saying is I have to construct my own function to iterate over segments. Does WTX dont provide any. what your experience saying? |
Yes, IBM decided not to install any looping or iteration function in their WTX product because they thought it would be fun to make everybody write their own. We should all be thankful they bothered to build in decision making capabilities and a parser......
stunned wrote: |
I am very much new to WTX soo ur words will be of great help to me... |
Then hear these words; learn the product and it's capabilities before trying to work on it! Read, discover and ideally get some training/mentoring.
The same advice you were given on your 2 previous threads regarding message sets and XML. If you don't want to follow advice, stop posting here asking for it. We won't feel bad. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
stunned |
Posted: Mon Apr 01, 2013 5:56 am Post subject: |
|
|
Newbie
Joined: 06 Mar 2012 Posts: 7
|
Thanks a lot Grand Poobah.... Will do as u adviced... |
|
Back to top |
|
 |
|