Tuesday, March 27, 2012
- Create Web Dynpro Application - TOP OF LIST in ALV - Web Dynpro ABAP
- Go to Component Controller COMPONENTCONTROLLER
- Context tab->Create END_OF_LIST node with attribute CONTENT (type ref to CL_SALV_FORM_ELEMENT).
- Context tab-> Map node END_OF_LIST of ALV Component context to END_OF_LIST of Component Controller.
- Methods tab->Write the code in WDDOINIT to populate data in ALV and creating TOP_OF_LIST and END_OF_LIST events.
- WDDOINIT method code
method wddoinit. wd_this->get_pa0002_data( ). wd_this->create_top_of_list( ). wd_this->create_end_of_list( ). endmethod.
method create_end_of_list . data lo_nd_top_of_list type ref to if_wd_context_node. data lo_el_top_of_list type ref to if_wd_context_element. data ls_top_of_list type wd_this->element_top_of_list. data:lr_grid type ref to cl_salv_form_layout_grid. * TOP-OF-LIST **...create top grid create object lr_grid exporting columns = 5. *... fill 1. row lr_grid->create_text( exporting row = 1 column = 1 rowspan = 1 colspan = 1 text = 'Cell 1,1' ). lr_grid->create_text( exporting row = 1 column = 2 rowspan = 1 colspan = 1 text = 'Cell 1,2' ). lr_grid->create_text( exporting row = 1 column = 3 rowspan = 1 colspan = 1 text = 'Cell 1,3' ). lr_grid->create_text( exporting row = 1 column = 4 rowspan = 1 colspan = 1 text = 'Cell 1,4' ). lr_grid->create_text( exporting row = 1 column = 5 rowspan = 1 colspan = 1 text = 'Cell 1,5' ). *...fill 2nd row lr_grid->create_text( exporting row = 2 column = 1 rowspan = 1 colspan = 1 text = 'Cell 2,1' ). lr_grid->create_text( exporting row = 2 column = 2 rowspan = 1 colspan = 1 text = 'Cell 2,2' ). lr_grid->create_text( exporting row = 2 column = 3 rowspan = 1 colspan = 1 text = 'Cell 2,3' ). lr_grid->create_text( exporting row = 2 column = 4 rowspan = 1 colspan = 1 text = 'Cell 2,4' ). lr_grid->create_text( exporting row = 2 column = 5 rowspan = 1 colspan = 1 text = 'Cell 2,5' ). "Navigate fromto via lead selection lo_nd_top_of_list = wd_context->get_child_node( name = wd_this->wdctx_top_of_list ). "pass TOL to context node lo_nd_top_of_list = wd_context->get_child_node( name = 'END_OF_LIST' ). lo_el_top_of_list = lo_nd_top_of_list->get_element( index = 1 ). call method lo_el_top_of_list->set_attribute exporting value = lr_grid name = 'CONTENT'. endmethod.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- 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.