Skip to Content
0
Former Member
Aug 04, 2008 at 03:49 PM

mapping and context problem

48 Views

Hi i am not being able to perform this mapping, the scenario is like this:

i need to create one LINE in the output for each E1PLOGI in the input when FLAG3 = 'S'

also as i don't understand completely the context theory i cant figure out in witch context to set the fields

My context is set like this

FLAG3 -> context = E1PLOGI

My logic is createif( FLAG3 = 'S' ) -> LINE

My xml test file have:

one E1PLOGI node without E1P0000

one E1PLOGI with E1P0000 node where FLAG3 = 'N'

one E1PLOGI completely OK

The result is that not even one LINE its created.

If only put one line ok it works ok, but if one line doesnt have an E1P0000 node or if FLAG3='S' then the next OK input lines it wont come out.

plase heeelp!

IN STRUCTURE

<Z_HRMD_A>

<IDOC BEGIN="1">

<EDI_DC40 SEGMENT="1">

<CREDAT>20080731</CREDAT>

</EDI_DC40>

<E1PLOGI SEGMENT="1">

<E1PITYP SEGMENT="1">

<E1P0000 SEGMENT="1">

<FLAG3>S</FLAG3>

</E1P0000>

</E1PITYP>

</E1PLOGI>

</IDOC>

</Z_HRMD_A>

Z_HRMD_A 1..1

IDOC 1..1

EDI_DC40 1..1

CREDAT 0..1

E1PLOGI 1..UNBOUNDED

E1PITYP 0..UNBOUNDED

E1P0000 0..UNBOUNDED

FLAG3 0..1

OUT STRUCTURE

<FILE_X>

<LINE>

<FIELD_1>

<FIELD_2>

<FIELD_3>

<FIELD_4>

</LINE>

</FILE_X>

FILE_X 1..1

LINE 0..UNBOUNDED

FIELD_X 0..1

Edited by: Mariano Billinghurst on Aug 4, 2008 6:05 PM

Edited by: Mariano Billinghurst on Aug 4, 2008 6:12 PM