on 04-10-2012 7:33 AM
I have created a hotspot for interactive ALV in Webdynpro ABAP.
But the hotspot link is not working.
I have used the following code in the method WDDOINIT of the view where ALV should be displayed.
method WDDOINIT .
DATA: lo_ref_cmp_usage TYPE REF TO if_wd_component_usage,
lo_salv TYPE REF TO iwci_salv_wd_table,
lo_value TYPE REF TO cl_salv_wd_config_table,
lo_column_settings TYPE REF TO cl_salv_wd_column, l
o_link_to_action TYPE REF TO cl_salv_wd_uie_link_to_action.
* create the used component
lo_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_ref_cmp_usage->has_active_component( ) IS INITIAL.
lo_ref_cmp_usage->create_component( ).
ENDIF.
* Get a pointer to the SALV interface controller
lo_salv = wd_this->wd_cpifc_alv( ).
* Get the reference to properties of all the columns and rows
lo_value = lo_salv->get_model( ).
* Get the reference to the column VBELN
call method lo_value->if_salv_wd_column_settings~get_column
EXPORTING id = 'VBELN'
receiving value = lo_column_settings.
* Create the object of cl_salv_wd_uie_link_to_action
* If the column has to be in the editable mode create the object
* of cl_salv_wd_uie_input_field instead.
CREATE OBJECT lo_link_to_action.
* Set the Field VBELN with the Hyperlink Texts in the Cells
lo_link_to_action->set_text_fieldname( 'VBELN' ).
endmethod.
Can anyone help me to find out why the hotspot is not working.
you have to add cell editor ( linkto action ) to your column( lo_column_settings) using set_cell_editor
add below line
lr_column_settings->set_cell_editor(lo_link_to_action ).
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You already declared it in your code , just check below one.
DATA: lo_ref_cmp_usage TYPE REF TO if_wd_component_usage,
lo_salv TYPE REF TO iwci_salv_wd_table,
lo_value TYPE REF TO cl_salv_wd_config_table,
lo_column_settings TYPE REF TO cl_salv_wd_column, l
o_link_to_action TYPE REF TO cl_salv_wd_uie_link_to_action.
* create the used component
lo_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_ref_cmp_usage->has_active_component( ) IS INITIAL.
lo_ref_cmp_usage->create_component( ).
ENDIF.
* Get a pointer to the SALV interface controller
lo_salv = wd_this->wd_cpifc_alv( ).
* Get the reference to properties of all the columns and rows
lo_value = lo_salv->get_model( ).
* Get the reference to the column VBELN
call method lo_value->if_salv_wd_column_settings~get_column
EXPORTING id = 'VBELN'
receiving value = lo_column_settings.
* Create the object of cl_salv_wd_uie_link_to_action
* If the column has to be in the editable mode create the object
* of cl_salv_wd_uie_input_field instead.
CREATE OBJECT lo_link_to_action.
* Set the Field VBELN with the Hyperlink Texts in the Cells
lo_link_to_action->set_text_fieldname( 'VBELN' ).
lr_column_settings->set_cell_editor(lo_link_to_action ).
Regards
Srinivas
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.