cancel
Showing results for 
Search instead for 
Did you mean: 

Hotspot not working in interactive ALV in Webdynpro ABAP

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member199125
Active Contributor
0 Kudos

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    

Former Member
0 Kudos

Hi Srinivas,

Thanks for your response.

But what should be the type declaration for lr_column_settings?

I tried declaring

  lr_column_settings TYPE REF TO cl_salv_wd_column,

But resulted in a dump.

Can you please check this.

Former Member
0 Kudos

Hi Srinivas,

Thanks for your response.

But what should be the type declaration for lr_column_settings?

I tried declaring

  lr_column_settings TYPE REF TO cl_salv_wd_column,

But resulted in a dump.

Can you please check this.

Former Member
0 Kudos

Hi,

In your code its lo_column_settings.

lo_column_settings->set_cell_editor(lo_link_to_action ).

Use on_click event of ALV to trigger the action on your link to action in the output.

former_member199125
Active Contributor
0 Kudos

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         

Former Member
0 Kudos

Thanks..its working now

Former Member
0 Kudos

Thanks .. its working now

Former Member
0 Kudos

Hi,

How to check whether i have clicked on hotspot or not in ALV?

Answers (0)