Recover an ABAP Program or FM
What if you accidentally delete a custom program/ function module:
Go to Tr: SE38
Type in your program name same as earlier name-> save and activate the empty program -> go back to the SE 38-> Go to Utilities -> Version management -> Check the recent version than your current one -> Retrieve.
Function Module: Tr: SE37
Type in your FM name same as your deleted one-> save it to the same function group as before without any code-> come back to the SE37-> Go to Utilities -> Recover your old version.
This methodology is strictly recommended for transportable objects only.