Professional Documents
Culture Documents
1. Go to the transaction SE80. Select “WebDynpro Comp./Intf” from the list (as shown below.
2. Create a new WebDynpro component by the name ‘zwd_input_enable_tab’. Give the description
as ‘Input Enable Table’.
3. Double click on the Component Controller. And go to the Context tab of the Component
Controller.
4. Check if the application is in change mode. Then create a node as shown below.
5. Create a node by the name ‘Material’. In this example we are taking the Dictionary Structure as
‘Mara’. And the Cardinality is 0..n.
6. Now create attributes of the node ‘Material’ by clicking on ‘Add Attribute From Structure’. And then
select the required fields of Mara and then click on ‘Continue’.
7. Now double click in the default view that is ‘Main’ in this example & then click on the Context tab
of that view as shown below.
8. Now drag and drop the Node on the right side (Component Controller Node) to the context on the
left side (View Node).
9. Go to the Layout tab of the View and then right click on the ‘ROOTUIELEMENTCONTAINER’ and
click on ‘Insert Element’. And then create a table as shown below.
10. Right click on the table and click on ‘Create Binding’, the following screen will appear.
11. Here click on the ‘Context’ button. And bind the table with the node (Here the Node is Material).
12. Now change the ‘Standard Cell Editor’ from ‘Textview’ which will come as default to ‘Input Field’
as shown below:
13. Click on Continue. And we will be back to the Layout page of the View.
14. Now click on the ‘Methods’ tab of the same View and then double click on the WDDOINIT
method.
METHOD WDDOINIT
Types : Begin of ty_mara,
MATNR type mara-matnr,
ERSDA type mara-ERSDA,
ERNAM type mara-ERNAM,
LAEDA type mara-LAEDA,
AENAM type mara-AENAM,
end of ty_mara.
*Creating internal table and Work Area of the same structure
*as that of the Node created.
Data : lt_material type standard table of ty_mara,
wa_mara type ty_mara.
*Appending Blank Work Area to Internal table.
Do 10 times.
Append wa_mara to lt_material.
enddo.
"Binding the table
In the above Code We will just create an internal table and Work Area that should have the same
structure as that of the Node created in the Component Controller. And then we have to just append
blank Work Area to the Internal Table in order to get Input Enabled Table. Once done we will bind the
table.
16. Now Right Click on the Component (ZWD_INPUT_ENABLE_TAB) and create WebDynpro
Application as shown below, give a description.
17. Now save and activate and then Right click on Application and test it. Now you will see that your
table is input enabled & user can enter data in it.