on 04-13-2011 5:01 PM
Hello All,
I am trying to get the "TableColumnGroup" value of a "TableColumn" in a standard table. Does anyone know how to get this? I would greatly appreciate your help if you can help me. Thanks.
Regards,
Gopal.
See the reply and code snippet of mine in your other forum
Once you have the column , column classes provides many methods, explore them to see which one you can use. (Just for your self experience and learning ).
If you are not able to get this done. Then explain here what you have done so far and what is not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you want to find out which column belong to which grouped column. Then i think you may have to get the Group_columns and columns from table. Loop through the grouped columns and get the columns from grouped columns. Cross check which with the column table you got it from table.
Note: I have used the following code to get all the columns(Grouped cols/Columns) in a table. You can copy this and modify a bit to for your scenario and post back the code which is working for your scenario.
data wd_grouped_col type ref to cl_wd_abstr_table_column.
data wd_column_group type ref to cl_wd_table_column_group.
data tmp_grouped_cols type cl_wd_abstr_table_column=>tt_abstr_table_column.
data wd_grouped_cols type cl_wd_abstr_table_column=>tt_abstr_table_column.
data wd_a_column type ref to cl_wd_table_column.
wd_columns = m_wd_table->get_columns( ).
wd_grouped_cols = m_wd_table->get_grouped_columns( ).
while wd_grouped_cols is not initial.
read table wd_grouped_cols into wd_grouped_col index 1.
delete wd_grouped_cols index 1.
if wd_grouped_col->_cid = cl_wd_table_column_group=>cid_table_column_group.
wd_column_group ?= wd_grouped_col.
tmp_grouped_cols = wd_column_group->get_columns( ).
insert lines of tmp_grouped_cols into table wd_grouped_cols.
else.
wd_a_column ?= wd_grouped_col.
insert wd_a_column into table wd_columns.
endif.
endwhile.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.