1. Execute transaction code SE38, fill in the report name, choose Source Code (under Subobjects) and press on Display.
2. From the top menu, select Utilities > Versions > Version Management. From here, you will see the previous version of current ABAP program. Before making any retrieval, you should do the comparison between the current version and previous version.
Local Comparison : Select current / previous version and click on compare (F8) (next to spectacle icon). The output will come out.
Remote Comparison : Select current version (or any version you wanted) and click on REMOTE comparison. You will be ask to define the target system. Click OK and you will get the output.
3. So, to retrieve – select the previous version and click on Retrieve.
4. Press Enter to overwrite.
5. Finally, activate the ABAP program and it will be revert back to the previous version.