Thanks for your response Raghuram,
No I can't repeat it at mapping level. Because I am sending this text data as IDoc at receiver side.
And also for example if incoming text file contains more than one FileHeader's/FileTrailerr's then I should reject that file.
Thanks
pavan