Try this,
grep -r abcd | awk -F ':' '{gsub(/.*\//,"",$1) }1' | awk '!seen[$1]++'
gsubwill remove directory structure.(/.*\//,"",$1)will remove("") all(.*) before the last match of '/' in first field($1).!seen[$1]++will uniq the filename.
Note: directory name must not have : in it.