Skip to Content
0
Sep 13, 2007 at 10:26 AM

Test if segment exist in XML IDOC source structure

136 Views

Hi,

I have a one to one mapping of IDOC ORDERS.

I need to test if the segment E1EDPT1 never exists in the xml instance.

If it does not i want to create it.

The problem is it takes context of the superiour node.

I don't want to add it if it exists in another context.

Example where it must not add the segments :

E1EDP01 (item1)

-E1EDPT1

--E1EDPT2

E1EDP01 (item2)

(segments does not exist)

E1EDP01 (item3)

-E1EDPT1

--E1EDPT2

Example where it must add the segments :

E1EDP01 (item1)

(segments does not exist)

E1EDP01 (item2)

(segments does not exist)

E1EDP01 (item3)

(segments does not exist)

I tried with MapWithDefault which is good for the second case but not the first as it adds the segments if it can't find the segments in node E1EDP01.

Thanks,

Laurent.