Show TOC Start of Content Area

Procedure documentation Creating Forms Using Context Data  Locate the document in its SAP Library structure

You can use the form template wizard to create a form layout for a view, based on the view context. For designing and implementing this form layout, you can use controller context data or access the data of a declared Web Dynpro model directly.

Prerequisites

You have completed all steps described under Applying View Templates.

Before you can begin defining the data for the form, you must have transferred the application data from the back end to the application controller by defining data binding. You must also have defined the data flow between the controller and an existing view. Proceed as described under Creating a Data Link.

Data Modeler tool is started.

Procedure

       1.      Choose context menu Apply Template on the view unit, next option Form.

       2.      Select those context attributes from the mapped data that you want to pass to the form for the data binding. Choose Next if you want to make changes to the bound data; if no changes are necessary, you can close the wizard.

       3.      In the next window, you can specify the order of the data if you would like to. For example, to move the first line further down, select the table entry and move the element down using the arrow button on the right.

Result

You can display the created layout in the layout tool View Designer, which is opened in the Data Modeler by choosing the context menu entry Edit on the view for which you created the form layout.

The View Designer displays the user interface elements defined when making the specifications for the form template, including their data source.

End of Content Area