The present invention relates to Pyrazolopyrimidinone compounds as PDE5 inhibitors with better IC50 value, good in vivo efficacy and PK profile and a process for the preparation thereof. The present invention covers the pyrazolo pyrimidinone based compounds that have been designed, synthesized and screened for PDE5 inhibitory activity and its PDE5 inhibitory potential is provided in this invention. These designer compounds have shown nanomolar potency when screened for PDE5 inhibitory activity and also shown better in vivo efficacy. These compounds can be used in the treatment of male erectile dysfunction or in the treatment of impotence.