Creating a Web Dynpro Component

The project structure you have created does not yet include all those elements that will enable you to define the specific functions of a application. These additional elements are encapsulated in a Web Dynpro component.

Thus, before you move on to defining the layout, navigation, event handlers, and so on, you must start by creating a Web Dynpro Component explicitly.

Prerequisites

The structure of the Welcome project you have created is currently displayed in the Web Dynpro Explorer.

Procedure

...

...

       1.      Expand the Web Dynpro node and open the context menu for Web Dynpro Components.

       2.      To open the wizard, choose Create Web Dynpro Component.

       3.      Enter the name WelcomeComponent for your Web Dynpro component and specify the package name (such as com.sap.examples.welcome) for the Java classes that will be generated.

       4.      Enter StartView for the view name.

       5.      Accept the other suggested values and choose Finish.

       6.      Save the new project data by choosing the  icon from the toolbar.

Result

The wizard performs several generation routines. Once it has finished, it automatically opens the Data Modeler view (on the right pane) and inserts an additional substructure for the new Web Dynpro component WelcomeComponent in the Web Dynpro Explorer.

Since our Web Dynpro component possesses views, which provide a visual representation of the application, a Window containing the initial view is also created. Provided you accepted the default settings in step 5, the window has the same name as the component (WelcomeComponent).

Next step:

Creating Views