Hi Mar,
You might want to look at threads below:
Suggesstions on flat file to IDOC | SCN
Converting IDoc XML to Flat File and Vice-Versa
There are a lot of options, evaluate your requirement and check what's the perfect fit.
hope this helps.
Jayj