Hi Madhu
I think you should take a look at LSMW for this task instead. It should be able to create Idocs for your need based on input files.
Take a look at LSMW (Legacy System Migration Workbench)
And this guide: Processing IDOC through LSMW
Best regards,
Chris