Hi Farooq,
<<To discard the file we have condition in our mapping, but problem is, sender communication channel it self skips this row and sending a complete file to message mapping>>
In my opinion it does not skip the particular row. Instead it takes the detail/item structure as one complete row, and this is the reason why the complete file is being passed through even when "D" is missing.
So, please use xml.Item.endSeparator with value 'nl'.
In that case it will take the different rows and stop the file from being sent in case "D" is missing.
Regards,
Souvik