on 02-10-2011 11:35 AM
Hello,
I have created dynamically a table with a popin, because the structure of table in known at runtime. Following the example of WD WDR_TEST_TABLE I have to add a column to my table and add an element to it of type TablePopinToggleCell. I have added dynamically the column and I have created the element. The problem is that I don´t know how to assign the element to the column per code:
DATA: popin_col TYPE REF TO cl_wd_table_popin_tgl_cell,
lr_column_name TYPE REF TO cl_wd_table_column.
* create popin column:
lr_column_name =
cl_wd_table_column=>new_table_column( id = 'COL_POPIN'
SELECTED_CELL_VARIANT = 'TOGGLECELL' ).
* popin toggle cell:
popin_col ?=
cl_wd_table_popin_tgl_cell=>new_table_popin_tgl_cell( id = 'popintogglecell'
VARIANT_KEY = 'TOGGLECELL' ).
* add popin toggle cell to the column:
lr_column_name-> ???
* Add column to the table:
lr_table->add_column( the_column = lr_column_name ).
I don´t find in the classe a corresponding method for that task.
can somebody help ?? thanks.
Hello Jorge,
i guess you can add it as a cell variant.
try this.
DATA: popin_col TYPE REF TO cl_wd_table_popin_tgl_cell,
lr_column_name TYPE REF TO cl_wd_table_column,
cell_var type ref to CL_WD_ABSTR_TABLE_CELL_VAR.
* create popin column:
lr_column_name =
cl_wd_table_column=>new_table_column( id = 'COL_POPIN'
SELECTED_CELL_VARIANT = 'TOGGLECELL' ).
* popin toggle cell:
popin_col ?=
cl_wd_table_popin_tgl_cell=>new_table_popin_tgl_cell( id = 'POPINTOTOGGLECELL'
VARIANT_KEY = 'TOGGLECELL' ).
cell_var ?= popin_col. "<<<<--------------------------------------
* add popin toggle cell to the column:
lr_column_name->ADD_CELL_VARIANT(
cell_var
).
* Add column to the table:
lr_table->add_column( the_column = lr_column_name ).
thanks
sarbjeet singh
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 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.