cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem Idoc to Flat file: above lying tags not available

Former Member
0 Kudos

Dear experts,

I have a mapping problem, trying to convert an Idoc to flat file. My Idoc looks like this:

-HEADER

---DETAIL

-


DETAILPARTNER

-


DETAILPARTNER

---DETAIL

etc

For each detailpartner I need to create 1 line in a flat file with the following structure:

RECORD

---RECORDNO

---HEADER

---DETAIL

---PARTNER

When I map DETAILPARTNER to RECORD, indeed I get 2 records in the outputstructure. But the data from the above lying tags (HEADER and DETAIL) are only included in the first output-record. Obviously when the second RECORD is being created, the info from HEADER and DETAIL are not available. Is there a way to solve this?

Thanks in advance

William

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

for HEADER you have to use std function UseOneAsMany so that it can be mapped to all RECORDS.

But when you are mapping the fields under DETAILS, then are you using the function SplitByValue (on each), if not then use it.

Regards,

Sarvesh

Answers (1)

Answers (1)

KennethEriksen
Participant
0 Kudos

Hi,

In addition to what Sarvesh said, make sure to set the context correctly for the inputs to the UseOneAsMany-function. You will probably set the DETAILPARTNER-fields you use as input2 and input3 to context HEADER, since the function requires there to be equal number of contexts in the inputs for it to work.

Br,

Kenneth

Former Member
0 Kudos

Thanks guys, that did the trick!