Here's some pseudo code:
loop at lt_file into ls_file.
if indicator = 'H', move ls_file to ls_header
if indicator = 'I', append ls_file to lt_item
if indicator = 'F', move ls_file to ls_footer
endloop.
There, now the file is split into 3 parts.
If you're not sure how to code that, I fear you may need some more ABAP training.
cheers
Paul