on 08-19-2008 2:43 PM
Hi,
I am trying to add UI element Table to the view dynamically. I am getting empty table, here is my code.
method WDDOMODIFYVIEW .
data:lr_container type ref to cl_wd_uielement_container,
lr_table type ref to cl_wd_table,
lr_layout type ref to cl_wd_flow_data,
node_flights type ref to if_wd_context_node,
it_flights type sflight_tab1.
node_flights = wd_context->get_child_node( 'SFLIGHT' ).
select * from sflight into table it_flights up to 100 rows.
node_flights->bind_table(
new_items = it_flights
* SET_INITIAL_ELEMENTS = ABAP_TRUE
* INDEX = INDEX
).
lr_table = cl_wd_table=>new_table(
* ACCESSIBILITY_DESCR = ACCESSIBILITY_DESCR
* BIND_ACCESSIBILITY_DESCR = BIND_ACCESSIBILITY_DESCR
bind_data_source = 'SFLIGHT' "Node name
* BIND_DESIGN = BIND_DESIGN
* BIND_EMPTY_TABLE_TEXT = BIND_EMPTY_TABLE_TEXT
* BIND_ENABLED = BIND_ENABLED
* BIND_FIRST_ACTUAL_ROW = BIND_FIRST_ACTUAL_ROW
* BIND_FIRST_VISIBLE_ROW = BIND_FIRST_VISIBLE_ROW
* BIND_FIRST_VISIBLE_SCROLL_COL = BIND_FIRST_VISIBLE_SCROLL_COL
* BIND_FIXED_TABLE_LAYOUT = BIND_FIXED_TABLE_LAYOUT
* BIND_FOOTER_VISIBLE = BIND_FOOTER_VISIBLE
* BIND_GRID_MODE = BIND_GRID_MODE
* BIND_LEGEND_ID = BIND_LEGEND_ID
* BIND_READ_ONLY = BIND_READ_ONLY
* BIND_ROW_COUNT = BIND_ROW_COUNT
* BIND_ROW_SELECTABLE = BIND_ROW_SELECTABLE
* BIND_SCROLLABLE_COL_COUNT = BIND_SCROLLABLE_COL_COUNT
* BIND_SELECTED_POPIN = BIND_SELECTED_POPIN
* BIND_SELECTION_MODE = BIND_SELECTION_MODE
* BIND_TOOLTIP = BIND_TOOLTIP
* BIND_VISIBLE = BIND_VISIBLE
* BIND_VISIBLE_ROW_COUNT = BIND_VISIBLE_ROW_COUNT
* BIND_WIDTH = BIND_WIDTH
DESIGN = cl_wd_table=>E_DESIGN-STANDARD
* EMPTY_TABLE_TEXT = EMPTY_TABLE_TEXT
ENABLED = ABAP_TRUE
FIRST_ACTUAL_ROW = 0
FIRST_VISIBLE_ROW = 0
* FIRST_VISIBLE_SCROLL_COL = FIRST_VISIBLE_SCROLL_COL
* FIXED_TABLE_LAYOUT = FIXED_TABLE_LAYOUT
FOOTER_VISIBLE = ABAP_TRUE
GRID_MODE = CL_WD_TABLE=>E_GRID_MODE-BOTH
* ID = ID
* LEGEND_ID = LEGEND_ID
* ON_FILTER = ON_FILTER
* ON_LEAD_SELECT = ON_LEAD_SELECT
* ON_SCROLL = ON_SCROLL
* ON_SORT = ON_SORT
* READ_ONLY = READ_ONLY
ROW_COUNT = -1
ROW_SELECTABLE = ABAP_TRUE
* SCROLLABLE_COL_COUNT = -1
* SELECTED_POPIN = SELECTED_POPIN
SELECTION_CHANGE_BEHAVIOUR = cl_wd_table=>E_SELECTION_CHANGE_BEHAVIOUR-AUTO
SELECTION_MODE = cl_wd_table=>E_SELECTION_MODE-AUTO
* TOOLTIP = TOOLTIP
* VIEW = VIEW
VISIBLE = cl_wd_table=>E_VISIBLE-VISIBLE
VISIBLE_ROW_COUNT = 50
* WIDTH = WIDTH
).
lr_layout = cl_wd_flow_data=>new_flow_data(
* CELL_DESIGN = E_CELL_DESIGN-PADLESS
element = lr_table
* ID = ID
* V_GUTTER = E_V_GUTTER-NONE
).
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_container->add_child( lr_table ).
endmethod.
Thanks,
Suman
hi kumar
could you show me the sources or links about POPIN. i'm wondering to know how to use/create popin in WebDynpro.
Thanks in advance,
Peerasit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use CL_WD_DYNAMIC_TOOL=>CREATE_TABLE_FROM_NODE
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use new_table also, however you have to create table columns and cell editors seperately for each column in that case.
in CREATE_TABLE_FROM_NODE method of CL_WD_DYNAMIC_TOOL
pass the parameter ON_LEAD_SELECT with the action name to map event dynamically
also you can call SET_ON_SCROLL and SET_ON_LEAD_SELECT methods of CL_WD_TABLE which is the return type of CREATE_TABLE_FROM_NODE
Abhi
Hi ,
There is a different method of creating the dynamic table in the screen . .Check the program 'DemoDynamic'.
With Regards,
Ranganathan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman,
Pass the parameter 'bind_data_source ' with '[View].[contextnodename]'. I think that should work.
with Regards,
Ranganathan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.