Vijay, I have a sincere suggestion to you, before you take any of these two options: first a retrospective self-analysis, introspection is required to find out how you could sustain yourself in a CMMI level 5 company for 4 years as a C++ programmer. I don’t think it is possible for any one unless he is quite good at his job especially in a CMM level 5 company and doing C++. There is some other reason behind your move that you have not stated here but you know very well.
Showing your 4 years experience as a tester will be a bluff to the organizations where you show it seeking a job. And any smart interviewer will make it out easily.
If you can settle yourself in SAP Basis within this organization, it will be very good, without worrying about the commercial benefits to you, close your eyes and go for it, as in the longer run, you will not be a looser.
But first introspect – why you want to take this move? And also think if after 4 years you think the same about Testing or SAP wherever you go, what next?