Hello Nihar,
Please check following SAp links where various issues related to Tcode SM58 have been mentioned with solutions..
Common RFC Problems - ABAP Connectivity - SCN Wiki
ALE Troubleshooting Guide - Technology Troubleshooting Guide - SCN Wiki
Regards
Anand