Skip to Content
avatar image
Former Member

Problem with Context in mapping

Hi.

I have a big problem with my mapping.

My input look like this.:

- <Rec>

- <raw>

<Rec_type>B</Rec_type>

<Record_data>0000340H150000006269 N2007020105070000727001000009000540006599350000000000</Record_data>

</raw>

- <raw>

<Rec_type>C</Rec_type>

<Record_data>0000350H1500000062690000107074030000610000000060800000004910001080 80620000727001</Record_data>

</raw>

- <raw>

<Rec_type>D</Rec_type>

<Record_data>0000360H15000000626900001070740000107079030000610000000060800000004920000000727001</Record_data>

</raw>

- <raw>

<Rec_type>D</Rec_type>

<Record_data>0000370H15000000626900001070740000107432030000000000000000000000000000000000727001</Record_data>

</raw>

- <raw>

<Rec_type>C</Rec_type>

<Record_data>0000380H1500000062690000115008010004995000000499900000041630001610 83470000727001</Record_data>

</raw>

- <raw>

<Rec_type>C</Rec_type>

<Record_data>0000390H1500000062690000115008050003997000000400300000033320001660 83470000727001</Record_data>

</raw>

- <raw>

<Rec_type>C</Rec_type>

<Record_data>0000400H1500000062690000115008030002996000000300000000024980001640 83470000727002</Record_data>

</raw>

- <raw>

<Rec_type>C</Rec_type>

<Record_data>0000410H1500000062690000115008040003995000000399900000033300001630 83470000727002</Record_data>

</raw>

- <raw>

<Rec_type>C</Rec_type>

<Record_data>0000420H1500000062690000115483010004850000000480100000040250000300 83110000727002</Record_data>

</raw>

- <raw>

<Rec_type>D</Rec_type>

<Record_data>0000430H15000000626900001154830000107432010000000000000000000000000000000000727002</Record_data>

</raw>

- <raw>

<Rec_type>D</Rec_type>

<Record_data>0000440H15000000626900001154830000107079010001453000000144000000011710000000727002</Record_data>

</raw>

- <raw>

<Rec_type>D</Rec_type>

<Record_data>0000450H15000000626900001154830000115124010003397000000336100000028590000000727002</Record_data>

</raw>

- <raw>

<Rec_type>C</Rec_type>

<Record_data>0000460H1500000062690000115502020004012000000399900000029470001240 73570000727001</Record_data>

</raw>

-

-

-

My target is an iDoc with this structure.:

IDOC

- E1OILT1

- - xxxx

- - xxxx

-

-

- - E1OILT2

- - E1OILT2

- - E1OILT2

- - E1OILT3

- - E1OILT3

For each B-record I'm going to produce an iDoc.

My problem is that all "C"-records shall into the first E1OILT3-segment and

all "D"-records shall into the second E1OILT3-segment.

It works well with the C-record but not with the D-records.

D is depend on C, but C dont need to have a D-record.

C could also have several D-records.

Don't know if I explained this good enough but i hope someone could give me an hint whats wrong with my context.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 21, 2007 at 07:30 AM

    then i think you need to write some JAVA code to do this.

    Create a User-Defined Function.

    and start using some of the ResultList Methods.

    check the blogs to how to do this.

    it will take you some time beacuse you need to understand the concept of Context if you don't know already.

    there is some methods like "addValue" that create a new Value.

    Regards,

    Roi Grosfeld

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 07:19 AM

    You are using the integration builder designer to do this?

    did you write any java code to get the "C"-records? or did you use the functions from the "node functions"?

    maybe if you answer this questions i can help you

    Regards,

    Roi Grosfeld

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 07:38 AM

    Hi,

    What abt D Records?are they going to be multiple for each C Record?

    if so,What is grouping criteris?

    Regards,

    Akshay.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      The D-records are optional. It could be none or several.

      The grouping are.:

      B iDoc start

      C

      D

      D

      C

      C

      D

      E iDoc end