Start of Content Area

Procedure documentation Copying a Custom Controller  Locate the document in its SAP Library structure

The refactoring function Copy is available for custom controllers. You can make the functions of an existing custom controller available as a copy under a different name within a Web Dynpro component. The copy function for custom controllers can also be used across Web Dynpro components.

Procedure

To copy a custom controller, proceed as follows:

       1.      In the Web Dynpro Explorer, place the cursor on the custom controller you want to copy and choose This graphic is explained in the accompanying textCopy in the context menu.

       2.      Place the cursor on the This graphic is explained in the accompanying textCustom Controllers node of the Web Dynpro component that is to be the target component.

       3.      Choose This graphic is explained in the accompanying textPaste in the context menu.

       4.      Enter a name for the custom controller copy and choose OK.

Result

The copy of the source file <myCustomController>.wdcontroller is inserted in the target project directory under the new name. The new custom controller is also displayed in the Web Dynpro Explorer. The controller copy is assigned the same model use as the original controller. The same applies to existing mapping definitions for the source controller, provided the mapping source can be reached in the mapping target.

Example

The model usage FlightModel was assigned to a controller FlightController. The same use relationship for this model now also exists for the controller copy Copy_of_FlightController.

 

End of Content Area