cancel
Showing results for 
Search instead for 
Did you mean: 

Fun times with flat file to multiple idocs

Former Member
0 Kudos

Hi

I have a flat file with structure as below

Header - 1 record

Detail   - many records with a field called "rectype". This rec type will have different values like AA,BB,CC etc.

Footer - 1 record

FCC definition for recordsetstructure is as below

Header,1,Detail,*,Footer,1

The problem is how do I specify the various key field values that identify different types of detail records - since I have one structure that has the occurrence *, key field specification is mandatory. But whatever i tried to do I can only specify one keyfield value - How to specify multiple key field values or deal with the situation so that I end with an xml as below

Header

---Detail1

------DetailField1

------DetailField2

---Detail2

-------DetailField2

Footer

Also another problem is creating multiple idocs from this flat structure.

I have re-imported the downloaded XSD of the original idoc after changing the occurrence of the idoc node to 1:unbounded.

The Detail node is mapped to <IDOC> node : IDOC is ADRMAS03 with one child segment having various nested segments.

The problem I have is multiple detail records go into one idoc rather than multiple idocs being created - I am observing this in message mapping test tab hence dont know where the problem is.

Have gone all the blogs out there talking about flat file - multiple idocs but the problem still persists.

Please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

anand_shankar10
Active Participant
0 Kudos

Hi Girish,

In order to get multiple IDOC you need to map the root node of IDOC to the repeating segment in the flat file.

This is 1:n mapping

Thanks

Anand

venkatagiri_gongadi
Participant
0 Kudos

Hi,

key field specification is not required because your details is only repeating,try with out key field specificatio it should  work(key field specification is required when header and details ocurence is more than one.).

Regards,

Girii