on 10-30-2007 12:04 PM
Hi Experts,
Please see my previous Question,
From the above forum I folowed the code giveb By Raja, But I got this error.
Where can declare <b>m_currencies</b> and based on which structure?
The Comple code from Raja is Below,
To Fill the M_CURRENCIES_REF:
IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
FIELD-SYMBOLS: <currency> TYPE IHTTPNVP.
CLEAR me->m_currencies.
APPEND INITIAL LINE TO me->m_currencies ASSIGNING <currency>.
<currency>-NAME = 'USD'. <currency>-value = 'US Dollar'.
APPEND INITIAL LINE TO me->m_currencies ASSIGNING <currency>.
<currency>-NAME = 'EUR'. <currency>-value = 'Euro'.
APPEND INITIAL LINE TO me->m_currencies ASSIGNING <currency>.
<currency>-NAME = 'ZAR'. <currency>-value = 'SA Rand'.
GET REFERENCE OF me->m_currencies INTO me->m_currencies_ref.
Thanks In Advance,
Points Assured for all suggestions.
You have to declare a table type eg: gt_currencies type IHTTPNVP in the attributes of the iterarot class.
in the constructor of the class populate the table gt_currencies.
in the method RENDER_CELL_START
METHOD if_htmlb_tableview_iterator~render_cell_start .
DATA: lo_ddlb TYPE REF TO cl_htmlb_dropdownlistbox
lo_text TYPE REF TO cl_htmlb_textview.
FIELD-SYMBOLS: <dat> TYPE ANY.
row_ref = p_row_data_ref.
CASE p_column_key.
WHEN 'CURRENCY'.
CREATE OBJECT lo_ddlb.
GET REFERENCE OF gt_currencies 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.
Note: in the method GET_COLUMN_DEFINITIONS you just define the cou,ns which you want to display int he table view.
Hope this helps.
Cheers
Amandeep
<i><b>Reward points for each helpful answer</b></i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.