on 10-30-2008 6:44 AM
Hi All,
Can anyone plz tell me the procedure for getting the drop down in alv table i am able to get the Buttons into it but not the Drop down .
i have tried using the drop down by key .
Regards,
sana.
Hi......
Use CL_SALV_WD_UIE_A_DRDN_BY_KEY for dropdown.....
and other things are as usual for table dropdown only.....
if you need any samples check in the standard component like....
SALV_WD_TEST_TABLE_EDIT
Hope this will help you....
Thanks & Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All ,
I have tried using the class CL_SALV_WD_UIE_DROPDOWN_BY_KEY
DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
DATA: l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model( ).
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_column type ref to CL_SALV_WD_COLUMN.
lr_dd_field TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.
lr_column_settings ?= l_value.
lr_column = lr_column_settings->get_column( 'PRICE' ).
CREATE OBJECT lr_dd_field EXPORTING SELECTED_KEY_FIELDNAME= '<viewname.contextnode.attributename>'.
lr_column->set_cell_editor( lr_dd_field ).
Still i am not able to get the drop down but values regarding that record in the table is filled
Please sugest me what i have missed
Regards,
Sana.
Dear All,
Thanks for all the suggetions given to me but still it is not working . I tried in various ways stilll:(.
I am pasting the whole code which i have written please check and let meknow what more i need to do .
*filling the alv table
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_use_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA: lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,
r_table TYPE REF TO cl_salv_wd_config_table.
get reference to ALV component interface
lr_salv_wd_table = wd_this->wd_cpifc_use_alv( ).
get ConfigurationModel from ALV Component
r_table = lr_salv_wd_table->get_model( ).
init ColumnSettings
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_col_header TYPE REF TO cl_salv_wd_column_header.
lr_column_settings ?= r_table.
get table of column settings - each line one column
DATA: lt_columns TYPE salv_wd_t_column_ref.
lt_columns = lr_column_settings->get_columns( ).
loop over table - in each loop another column can be modified
DATA: ls_column TYPE salv_wd_s_column_ref.
LOOP AT lt_columns INTO ls_column. " get header of column
lr_col_header = ls_column-r_column->get_header( )." do settings here
ENDLOOP.
LOOP AT lt_columns INTO ls_column.
CASE ls_column-id.
*for button UI element to be filled
WHEN 'SOCODE'.
DATA: lr_button TYPE REF TO cl_salv_wd_uie_button.
CREATE OBJECT lr_button.
ls_column-r_column->set_width( '1' )." image source is in the value of the cell
lr_button->set_image_source_fieldname( ls_column-id ).
CALL METHOD ls_column-r_column->set_cell_editor
EXPORTING
value = lr_button.
WHEN 'STATUS'.
*for the dro down to be filled.
DATA: lr_dp TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
CREATE OBJECT lr_dp
EXPORTING
selected_key_fieldname = 'STATUS'.
CALL METHOD ls_column-r_column->set_cell_editor
EXPORTING
value = lr_DP.
CALL METHOD lr_dp->set_selected_key_fieldname
EXPORTING
value = ls_column-id.
.
ENDCASE.
ENDLOOP.
data ls_valueset type wdr_context_attr_value.
data lt_valueset type wdr_context_attr_value_list.
data lo_nd_info type ref to if_wd_context_node_info.
Data: lt_value type table of zissuestruc,
ls_value type zissuestruc.
DATA lo_nd_table_alv TYPE REF TO if_wd_context_node.
DATA lo_el_table_alv TYPE REF TO if_wd_context_element.
DATA: ls_table_alv TYPE wd_this->element_table_alv,
lt_table TYPE wd_this->elements_table_alv.
navigate from <CONTEXT> to <TABLE_ALV> via lead selection
lo_nd_table_alv = wd_context->get_child_node( name = wd_this->wdctx_table_alv ).
get element via lead selection
lo_el_table_alv = lo_nd_table_alv->get_element( ).
SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_table
FROM zse_project1
WHERE seprojcode = 'PJ337' OR seprojcode = 'PJ356' OR seprojcode = 'PJ292'.
*it is the bapi which will fetch me the drop down values which should be filled
CALL FUNCTION 'ZBAPI_FETCH_FROM_TABLE'
EXPORTING
i_issuecat = 'DEFECT_STATUS'
tables
ET_ERRORNEW =
et_value = LT_VALUE.
.
Loop at lt_value into ls_value.
*ls_dp-status = ls_value-description.
ls_valueset-text = ls_value-DESCRIPTION.
ls_valueset-value = ls_value-value.
append ls_valueset to lt_valueset.
endloop.
*get element via lead selection
lo_nd_info = lo_nd_table_alv->get_node_info( ).
lo_nd_info->set_attribute_value_set(
exporting
name = 'STATUS'
value_set = lt_valueset
).
lo_nd_table_alv->bind_table( lt_table ).
Here for one coloum i used button that is getting filled but similarly i tried using for drop down it is not working .
Kindly help.
Regards,
Misbha Sultana.
Thanks to All , My problem is solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
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.