Grind the coconut along with the garlic and keep aside. Heat oil in a pan and temper with mustard seeds and dry red chili.
After it stops spluttering, add the chana dal and urad dal. Saute for a few seconds. Then add the curry leaves, green chilies and onion. Fry till the onion turns translucent.
Now add the beans, salt and turmeric powder. Mix well and cook, covered on a low flame till done. Sprinkle water at intervals if required.
When the beans turns soft, switch off the flame. Add the ground coconut and coriander leaves.
Toss well and serve as a side dish with plain steamed rice, jeera rice, curd-rice, sambar-rice or just plain chapati.