Application Development and Automation 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: 
Read only

Change Redefined Method

sap_cohort
Active Contributor
0 Likes
2,237

Hi, I have a class method that has already been redefined by another developer. I would like to change this redefined method. When I go into change mode the code turns a light grey and it won't let me make any changes even though it says it is in change mode.

The class was marked as final so I removed that thinking that was the problem, but it didn't help. Can't I change an earlier redefined method?

What am I doing wrong?

Thanks!

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,779

Hello Kenneth

Changing a redefined method is basically the same like changing any other method (only at the very first time we have to push the "Redefine" button to open the method for redefinition).

My guess is that the sub-class containing the redefined method may be "fishy": When you check the object catalogue entry (SE24, menu Goto -> Object catalogue entry) is the source system the same like your DEV system?

Regards

Uwe

7 REPLIES 7
Read only

Former Member
0 Likes
1,779

Hi,

Check Modification operations using Menu path are enable or not..

Edit->Modification operations-> Insert Line area

Edit->Modification operations-> Replace Line area

Edit->Modification operations-> Delete Line area

Edit->Modification operations-> Undo Modifcation

If these functions are enabled then you need to use these funtion to modify the code...

You need to place the cursor where you want to change and code and using the above menu path select the Insert Line area function and write you code here.

Similarly you can use other functions depending on your requirement.

You can find these functions on the application tool bar.

Read only

0 Likes
1,779

Hi, I checked for this and there are no changes made using the modification assistant...

Any more ideas? Greatly appreciated!

Read only

0 Likes
1,779

Hi,

If the class was release earlier and changes were made later on.You can retrieve the Earlier Version of program from Version Management.

1) Menu-->Utility-->Version-->Version Management.
2) Click the Version-->Press Retrieve Button

Regards,

Gurpreet

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,780

Hello Kenneth

Changing a redefined method is basically the same like changing any other method (only at the very first time we have to push the "Redefine" button to open the method for redefinition).

My guess is that the sub-class containing the redefined method may be "fishy": When you check the object catalogue entry (SE24, menu Goto -> Object catalogue entry) is the source system the same like your DEV system?

Regards

Uwe

Read only

Former Member
0 Likes
1,779

not possible to create an new class and redefine the method there?

and reference to the new class when creating the object... maybe use if (x = x) to create the object dynamically... then u can redefine...

example:

if 1 = 1.

create object 1.

else.

create object 2.

endif.

object 2 (your redefined method).

method xxx.

super->super->xxx.

endmethod.

object 1

method xxx.

super->xxx.

endmethod.

If there is a techn. problem check the original system. I had sometimes the same problem.

Read only

bryan_cain
Contributor
0 Likes
1,779

Sorry if this is a stupid question -

Are you sure it's a redefinition you're trying to change, and not an over-write method of an implicit enhancement?

Read only

sap_cohort
Active Contributor
0 Likes
1,779

Did not have to redefine method. Code was found to be correct. Thank You for your help