on 09-18-2007 8:34 PM
hi,
in my bsp i display a table via mvc iterator.
in the attributes of the iterator tab i have defined <b>m_row_ref as type ref of the table displayed</b>.
i have created as well a new field that i display in a dropdownlistbox.
this new field <b>does not belong to the table displayed</b>.
the question is:
<u>do i have to add this new field to the table so that m_row_ref contains it?</u>
<u>or is there another way to know which value of the dropdownlistbox has been selected?</u>.
Best regards.
Hi,
sorry but i don´t get it.
i´ll try to add more information.
in the RENDER_CELL_START method i do:
CASE p_column_key.
WHEN '
THEFIELDTHATDOESNOTBELONGTOROWREF
'selection
table = table_ref
nameofkeycolumn = 'NAME'
nameofvaluecolumn = 'VALUE' ).
i ´m still not able to get a value in field "selection"
Best regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First make sure you declare the column in the <b>GET_COLUMN_DEFINITIONS</b> method...
Then Just try and put this code in <b>RENDER_CELL_START</b>.
FIELD-SYMBOLS : <fs> type any ,
<l_field> type any.
assign p_row_data_ref->* to <fs>.
ASSIGN COMPONENT 'your_column_name' OF STRUCTURE <fs> TO <l_field>.
if <l_field> is assigned .
selection = <l_field> .
endif .
the component your_column_name has to be in your table...as you will need some value in your DDLB...
Hope this helps.
<b><i>Do reward each useful answer..!</i></b>
Thanks,
Tatvagna.
Hi,
In the Attribute of the Iterator decalre a table which hold the key and the value.
Example
LT_SEQ_NO Instance Attribute Public Type CRMT_PRT_MAP
Populate the this table where ever you feel comfortable. I would declare constructor method of the iterator and populate it there.
go to method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START .
DATA: lo_text TYPE REF TO cl_htmlb_textview,
lo_ddlb TYPE REF TO cl_htmlb_dropdownlistbox.
FIELD-SYMBOLS: <dat> TYPE ANY.
row_ref = p_row_data_ref.
CASE p_column_key.
WHEN 'SORT_NUM'.
CREATE OBJECT lo_ddlb.
GET REFERENCE OF lt_seq_no INTO lo_ddlb->table.
lo_ddlb->id = p_cell_id.
lo_ddlb->nameofkeycolumn = 'ENTRY_KEY'.
lo_ddlb->nameofvaluecolumn = 'ENTRY_VALUE'.
lo_ddlb->selection = get_column_value( p_column_key ).
p_replacement_bee = lo_ddlb.
WHEN OTHERS.
CREATE OBJECT lo_text.
lo_text->id = p_cell_id.
lo_text->wrapping = 'FALSE'.
lo_text->text = get_column_value( p_column_key ).
lo_text->design = 'STANDARD'.
p_replacement_bee = lo_text.
ENDCASE.
ENDMETHOD.
Modify the method as per your need.
Amandeep
<b><i>Do reward points for each usefule answer</i>.</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alternatively, you can use this code snippet to get the value of any column.
FIELD-SYMBOLS : <fs> type any ,
<l_field> type any.
assign p_row_data_ref->* to <fs>.
ASSIGN COMPONENT your_column_name' OF STRUCTURE <fs> TO <l_field>.
if <l_field> is assigned .
lw_rgid = <l_field> .
endif .
There is no need to declare an additionally column...if you just want values from any other column....then you can use the above snippet....
Hope this helps.
<b><i>Do reward each useful answer..!</i></b>
Thanks,
Tatvagna.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.