Skip to Content
avatar image
Former Member

Idoc to flat file conversion: problem with mapping

Dear experts,

I have the following scenario: SAP (idoc) -> XI -> 3rd party

The idoc has s structure like this:

. ZSCX001 (idoc name)

... IDOC

..... ORDERHEADER

....... ORDERLINE

......... DELIVERY LINE

......... DELIVERY LINE

..... ORDERHEADER

....... ORDERLINE

......... DELIVERY LINE

......... DELIVERY LINE

etc

The flat file has this structure:

. FILENAME

... RECORD

..... FIELD1

..... FIELD2

... RECORD

..... FIELD1

..... FIELD2

etc

Now, per IDOC I need to create 1 file. For each delivery-line in the IDOC I need to create 1 record in the outputfile (flat file).

In message mappings, I did the following:

- messages-tab: Occurrence of the Idoc and inbound message type for flatfile: both 1

- design-tab: I linked IDOC to the FILENAME (so for each Idoc I create 1 flat file)

- design-tab: I linked the tag "Delivery line" to "RECORD" (I expected 1 record per delivery line)

When I test it, I only get 1 resulting record in the flat file, even if I test with 3 ORDERHEADER->ORDERLINE->DELIVERY LINE segments.

Can anybody tell me what I am doing wrong?

Thanks in advance,

William

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 25, 2009 at 03:33 PM

    Hi,

    First make sure occurence of Record is 0..unbounded.

    Second use the blow mapping rule..

    Delivery line --->RemoveContext ---> RECORD

    Regards,

    Sarvesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 25, 2009 at 03:32 PM

    make the occurance of Record type to 0 to unbounded and map the Root of delivery line to record type.

    U must have delivery line occurance also 0 to unbounded.

    chirag

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      u can but this is open forum where u can get more inputs so i prefer to have discussion on the same.

      u can upload the screen shot and provide the link here

      chirag