• Instead of returning the value and raising error, I took the previous option i.e. converting into Stored procedures.

    This took only less time for me to convert.

    Thank you Guys, For your support...:)