Saturday, March 10, 2012
If you remember properly sub screen usage in ABAP dialog programming, we can co-relate Web Dynpro ViewContainer UI element to Sub screen. In dialog programming, We create screen as sub screen and we define sub screen area on main screeen. Call subscreen in the main screen.
ViewContainerUIElement is an area within a view that contains another view.
Uses
View positioning: Flexible design of view assemblies within the browser window.
Application performance: The Web Dynpro runtime environment uses the visibility property of the ViewContainerUIElement to reduce the layout data sent to the client. Using the ViewContainerUIElement in this way can improve application performance.
Fundamental principle to use ViewContainerUIElement
Create one more view SEC_V->Create one PAGE_HEADER element.
ViewContainerUIElement is an area within a view that contains another view.
Uses
View positioning: Flexible design of view assemblies within the browser window.
Application performance: The Web Dynpro runtime environment uses the visibility property of the ViewContainerUIElement to reduce the layout data sent to the client. Using the ViewContainerUIElement in this way can improve application performance.
Fundamental principle to use ViewContainerUIElement
- Create one main View
- Define View Container area using ViewContainerUIElement
- Create one more view to embed into View Container
- Embed second view using Drag and Drop method.
Example
- Create Web Dynpro Component and Save it as local object.
- Go to View MAIN_V -> Go to Context tab -> Create node N1 and include few attributes as shown in the screen.
- Go to Layout tab ->Change Layout type of ROOTUIELEMENTCONTAINER to MatrixLayout.
- Create VIEW_CONTAINER_UIELEMENT ->Change Layout data to MatrixHeadData
- Create GROUP element -> Change Layout to GridLayout & Layout Data to MatrixHeadData
- Create TextView elements -> Bind with Context node N1 as shown below.
- Go to Methods tab -> Write below code in WDDOINIT method.
METHOD wddoinit . DATA lo_nd_n1 TYPE REF TO if_wd_context_node. DATA lo_el_n1 TYPE REF TO if_wd_context_element. DATA ls_n1 TYPE wd_this->element_n1. * navigate from <context> to <n1> via lead selection lo_nd_n1 = wd_context->get_child_node( name = wd_this->wdctx_n1 ). * get element via lead selection lo_el_n1 = lo_nd_n1->get_element( ). SELECT SINGLE * FROM pa0002 INTO CORRESPONDING FIELDS OF ls_n1. * set all declared attributes lo_el_n1->set_static_attributes( static_attributes = ls_n1 ). ENDMETHOD.
- Embed SEC_V view to into View Container as shown below.
- Create Web Dynpro application and save it as local object.
- Run Web Dynpro application .
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Sending email with pdf attachment
- ABAP - Step by step tutorial on Smart Forms - Template Node
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.