Hi Santhoshi,
As you have two scenario; One to generate an Idoc and another to create a file, Use two operations mappings in Interface determination. One mapping to Idoc and another will to Soap to File mapping to map entire field to create file in desired format.
Regards,
Pranav