If you have all of the source code and you know how to compile it then you can upgrade to "the latest and greatest". The current "long term support" release is 12.2.12, 12.7 is the current "innovation release".
If you do not have source and cannot compile code (you only have r-code) you can still upgrade to whatever the latest release & service pack is for your major version number. For instance if you have OpenEdge 10.1b you can upgrade to 10.2b08 and still run all the same r-code without a need to recompile.