Show TOC Start of Content Area

Procedure documentation Moving Components to Associated Classes  Locate the document in its SAP Library structure

Use

You use this procedure to move attributes, methods and events of a class to an associated class.

Note

The classes are associated in the defining class using an attribute with TYPE REF TO <Name_of_associated_class>.

Caution

Note that a conflict could occur if methods that you move to an associated class were already redefined in a subclass. In this case the subclass contains a syntax error.

Procedure

...

       1.      Select the class.

       2.      Make sure you are in Change mode.

       3.      Choose Utilities ® Refactoring ® Refactoring Assistant.

       4.      Select the component to be moved and move it to the name of the associated class (in the Associations folder) using Drag & Drop.

       5.      Choose Save.

Result

The selected component is deleted from the original class and created in the associated class.

Note

This function is especially useful for splitting a class. For more information, see Splitting Classes

 

 

End of Content Area