Thursday, February 16, 2012
Simple method.
- Create webdynpro component e.g. ZOVH_CHKBOX_ON_TABLE_002 →Save.
- Go to Context tab → Create node e.g. EMP_ADD with cardinality 0-n. →>save
- Go to Layout tab → Drag and drop Table UI element from UI elements library or right click on ROOTUIELEMENTCONTAINER → Create UI element → Give ID e.g.TAB_DAT and select type TABLE → Save.
- Bind Context node with Table UI element. Right click on Table UI element TAB1→Create Binding → Select the node from context → Continue → Save.
- Go to Methods tab → Use WDDOINIT → SELECT the data and Set the table data to Context elements.
METHOD wddoinit . DATA lo_nd_emp_add TYPE REF TO if_wd_context_node. DATA lt_emp_add TYPE wd_this->elements_emp_add. "Navigate from <CONTEXT> to <EMP_ADD> via lead selection lo_nd_emp_add = wd_context->get_child_node( name = wd_this->wdctx_emp_add ). "Fetch data SELECT * FROM pa2006 INTO CORRESPONDING FIELDS OF TABLE lt_emp_add UP TO 50 ROWS. "Find the table values to Context lo_nd_emp_add->bind_table( new_items = lt_emp_add set_initial_elements = abap_true ). ENDMETHOD.
- Save and activate Webdynpro component.
- Create Webdynpro application and Run the application.
Changing existing table for check box.
- Create webdynpro component e.g. ZOVH_CHKBOX_ON_TABLE →Save.
- Go to Context tab → Create node e.g. EMP_ADD with cardinality 0-n. →>save
- Go to Layout tab → Drag and drop Table UI element from UI elements library or right click on ROOTUIELEMENTCONTAINER → Create UI element → Give ID e.g.TAB1 and select type TABLE → Save.
- Bind Context node with Table UI element. Right click on Table UI element TAB1→Create Binding → Select the node from context → Continue → Save.
- Go to context tab again, create one attribute for check box in the node EMP_ADD.
- Go to Layout tab → Right click on Table element → Insert table column → Insert Cell editor for Check box → Bind the context CHK1 attribute to Table check box cell.
- Go to Methods tab → Use WDDOINIT → SELECT the data and Set the table data to Context elements.
- Save and activate Webdynpro component.
- Create Webdynpro application and Run the application. Table is displayed with data in window.
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.