on 02-14-2008 3:53 PM
Dear experts,
I would like to know the following. I have an Idoc to xml-file scenario. The xml is provided. There are for each row in the idoc a number of similar segments (1..unbounded). I want to copy only those segments if they have a particular value, this is always one segment from this header, can never be more with the same value in VAL. Like this:
Source:
<HEADER>
<SEGMENT>
<XAL>555</XAL>
<VAL>name one</VAL>
</SEGMENT>
<SEGMENT>
<XAL>666</XAL>
</SEGMENT>
<SEGMENT>
<XAL>777</XAL>
<VAL>name three</VAL>
</SEGMENT>
</HEADER>
As a result I want to map only the value from VAL where in that same segment XAL=777
So:
<TARGETHEADER>
<VAL>name three</VAL>
</TARGETHEADER>
How do I accomplish this?
Kind regards.
Auke,
As said by patrick use IF Without ELSE.
Do the logic,
XAL & Constant(777) -
>equals----->IF Without else -
>Target
Choose equals function under Text category.
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In you mapping, you can do like this.
Source Segment (if XAL is not initial) --- > Target Segment. (doing this will allow only those segments which are having a value in XAL)
Now inside this segment check if XAL Equals "777" then map VAL to Target node.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
you can use the standard function 'if-without-else'.
if 'XAL = 777' then ...
Regards
Patrick
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 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.