Hi Sandeep,
I would be happy to help you, but some (if not all) details are missing.
The best way will be to issue a custom message liek "Error in line & of input file" and store that in BAPIRET2 table.
If your program does not know the line number where the error was detected, you may use a random number to issue.
Regards Clemens