Sunday, April 1, 2012
This program is used as base program for other posts related to ALV events implementation in this blog.
Program steps
- Create Web Dynpro Component with Window and View(Automatically View is embedded into Window).
- Define Component Use ALV for the Used component SALV_WD_TABLE under Used Components tab of Web Dynpro Component.
- Go to Component Controller COMPONENTCONTROLLER
- Properties tab->Define or Include Used Controllers/ Components of ALV.
- Context tab->Create PA0002 node with cardinality 0..n.
- Methods tab->Write the code in WDDOINIT to populate data in ALV.
- WDDOINIT method code
method wddoinit . wd_this->get_data( ). endmethod.
METHOD get_data .
DATA lo_nd_pa0002 TYPE REF TO if_wd_context_node.
DATA lt_pa0002 TYPE wd_this->elements_pa0002.
"Navigate from <CONTEXT> to <PA0002> via lead selection
lo_nd_pa0002 = wd_context->get_child_node( name = wd_this->wdctx_pa0002 ).
SELECT *
FROM pa0002
INTO CORRESPONDING FIELDS OF TABLE lt_pa0002
UP TO 40 ROWS.
lo_nd_pa0002->bind_table( new_items = lt_pa0002 set_initial_elements = abap_true ).
ENDMETHOD.
- Go to view ALV_EVENTS_V
- Layout tab->Create View Container UI element to display ALV output.
- Go to INTERFACECONTROLLER_USAGE of ALV->Map Context node PA0002 of component controller to node DATA of ALV Interface Controller.
- Go to window ALV_EVENTS _W->Embed TABLE view of SALV_WD_TABLE component in window as shown in the screen.
- Activate Web Dynpro component.
- 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.