Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Downgrade of code - How to?

SimoneMilesi
Active Contributor

Hello all!

It's a quite strange situation i'm dealing with: we have a new customer with a really old release where we'd like to move a package of ours to implement our model and some stuff.

The pacakge relies here and there on "new" releases of classes like cl_abap_tabledescr and cl_abap_structdescr, but I'm struggling to adapt it because everything is totally missing (methods) or different (declarations and attributes).

Apart the most impellent and urgent issue (how to fix these two classes), how do you usually approach such kind of situation?
There is any good hint, thumb rule or best practice I should attend and I'm totally missing?

Thanks!

3 REPLIES 3

matt
Active Contributor

What are you using the RTTS classes for? If it's to create dynamic tables, then you can use the ALV approach. First though, encapsulate all your RTTS calls into a separate method or methods. Then you only have to change that bit.

If it's more complex, then you'll need to use GENERATE SUBROUTINE POOL yourself.

If it's just too much horrible work, I'd seriously consider saying - thanks for the offer, but no. Come back to me after you've upgraded. I work for a company that produces software for others - if you're not on 731, we don't sell it to you. (I pushed for 752, but the boss, being a meanie, said no. 😉 ).

SimoneMilesi
Active Contributor
0 Kudos

We had no strength to say "Upgrade and then come to us" in this situation, so... horrible work on going!

One use is dynamic tables and I already replaced the model code (which, btw, i inherit jumping on the project) with ALV approach, but there is some pieces of code which reason on the RTTS results like datatype and so on.
At the moment, i'm hunting for FMs or other workarounds (DD0x... tables can help a lot in my case): boring work, but it seems to be ok (crossed fingers!)


So, hypotetically, if you'd be forced to downgrade the software, which approach would you use? 😛

matt
Active Contributor

Encapsulate the incompatible stuff as much as possible in your source development system. Write test programs (obv. no chance for ABAP Unit Test!) that test that the results in the changed area are the same in the non-downgraded version as in the downgraded.

Explain it will take a lot of time to downgrade and debug. Charge a fortune.