Show TOC Start of Content Area

Procedure documentation Extracting Source Code Segments  Locate the document in its SAP Library structure

Use

You use this procedure to transform source code segments into procedural units by means of the Refactoring Assistant.

Procedure

...

       1.      In the Object Navigator (transaction SE80), navigate to the class or function group you want to edit.

       2.      Select the code fragment you want to change.

       3.      Position the cursor anywhere in the source code. In the context menu, choose Refactoring Extract Source.

The Refactoring Assistant Wizard appears

       4.      Choose Continue.

       5.      In the Method Name or Function Name field, enter the name of the new procedural unit and choose Continue.

       6.      Choose the type of method you need. The available options are: public, protected, and private.

       7.      Choose Continue.

An overview screen appears with the data you have entered.

       8.      Choose Save.

Note

This procedure is valid for both global and local classes. In a function group, the code is extracted by default into new functions, whereas in classes it is extracted into new methods having the appropriate level of visibility.

End of Content Area