cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc to flat file conversion: problem with mapping

Former Member
0 Kudos

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

View Entire Topic
Former Member
0 Kudos

Hi,

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

Second use the blow mapping rule..

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

Regards,

Sarvesh