Label : Label UI element is used to provide Labels on the view It has two properties LABEL FOR & TEXT.

Button : This UI element is used to perform certain actions . When ever user interacts or takes an action on a button corresponding event handler method is called. Button is always associated with Action ONACTION METHODS: In Webdynpro we have 3 different types of methods . 1. METHOD : This is a normal method which should be called explicitly by the programmer using the self reference of controller WD_THIS. 2. SUPPLY FUNCTION: This method is called implicitly by the webdynpro framework . This method is used to initialize the values on a node 3.EVENT HANDLER METHOD: This method is automatically called when ever corresponding event is triggered. whenever you create any action , system creates corresponding event handler method with name onaction<action name> . To implement any event handler method double click on it . MAPPING : Mapping Is Used To Share The Data Between Different Controllers Of Same Or Different Component There are 3 different types of mappings 1. INTERNAL MAPPING 2. DIRECT MAPPING /SIMPLE MAPPING 3. EXTERNAL MAPPING

INTERNAL MAPPINGS: Mapping the context nodes of one controller with another controller within the same component is called as internal mapping . The context node which acts as source of supply is called as mapping origin the context node which is mapped is called as mapped node. RULES/GUIDELINE FOR MAPPING 1. Only the nodes can be mapped not attributes of context. 2. View controller context cannot act as mapping origin . 3. *** The usage of the corresponding controller should be defined in the current controller .

A. Create a node called as MARA in component controller with cardinality 0:n cardinality. cardinality will tell how many records a node can accommodate at runtime. It has 4 different values 0:1 : ZERO OR ONE ELEMENT INSTANCE ( I.E ZERO OR ONE RECORD IN NODE ) 0:N : ZERO OR MANY ELEMENT INSTANCE 1:1 : EXCTLY ONE ELEMENT INSTANCE 1:N : ATLEAST ONE INSTNACE  NOTE: The cardinality be default for a node is 1:1

B. Maintain the attributes for this node RIGHT CLICK ON NODE->CREATE->ATTRIBUTE

3.Use the WDDOINIT method of component controller , to populate the data on the node WDDOINIT: This is the first method called when the controller is initialized . WDDOEXIT: This method is called when you exit from the controller . This methods are also called as hooker methods . coz these methods are automatically Called by Webdynpro framework when ever wanted to do any operation on a node , as developer look into the methods of IF_WD_CONTEXT_NODE. This node interface contains methods like 1. GET_CHILD_NODE : This method will return the reference of child node of type IF_WD_CONTEXT_NODE . 2. REMOVE_ELEMENT : This method is used to deleted the element from a node 3. INVALIDATE : This method is used to refresh the records of a node .

4. GET_ELEMENT : This returns the reference of element of type IF_WD_CONTEXT_NODE belonging to the node. 5. BIND_TABLE: This method is used to bind internal table data to the node .

4. Go to the view and define an internal mapping To define an internal mapping drag the node from CC Context and drop at view controller context

5. Go to the layout and create a table UI element Table UI element can be created in two ways 1. Manually 2. Automatically

To create a table UI element automatically use the wizard & select the table option-> select the context ->select the required node.

All the properties related to table & table columns are automatically defined if wizard is used. Property for table : DATASOURCE (which too is automatically binded with context node MARA )

Go to Layout & select the wizard

Activate & Test

Sign up to vote on this title
UsefulNot useful