cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a hyperlink column in Webdynpro ALV

Former Member
0 Kudos

Hi Experts

     I have  a requiremnt in Webdynpro ABAP. There is an ALV which is displaying in  a view container should have two hyperlink fields. While clicking on that link it should navigate to corresponding views. Kindly help me to create hyperlink column in ALV. Or is it possible to have a hotspot in Webdynpro?

Regards

Pradeep

Accepted Solutions (1)

Accepted Solutions (1)

chengalarayulu
Active Contributor
0 Kudos

Hi Pradeep,

Please refer the below code snippet.


step1:  Get the refernce of Interface controller and call GET_MODEL( )          method using code wizard

Step2 : implement the code given by SAP for Adding buttons to ALV column

DATA: lr_link_to_action TYPE REF TO cl_salv_wd_uie_LINK_TO_ACTION.

DATA: lr_column TYPE REF TO cl_salv_wd_column.

lr_column = l_value->if_salv_wd_column_settings~get_column( 'ID' ).

CREATE OBJECT lr_link_to_action.

lr_link_to_action->SET_TYPE_FIELDNAME( 'ID' ).

lr_column->set_cell_editor( lr_link_to_action ).

Former Member
0 Kudos

Hi

I am not able to create reference for Interface controller. Could you please help?

Former Member
0 Kudos

Hi Pradeep,

Following is the code sample which access a interface controller.

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

  lo_interfacecontroller =   wd_this->wd_cpifc_alv_ref( ).

  DATA lo_api_interfacecontroller TYPE REF TO if_wd_controller.

  lo_api_interfacecontroller = lo_interfacecontroller->wd_get_api( ).

  DATA: lo_context  TYPE REF TO if_wd_context,

        lo_root_node  TYPE REF TO if_wd_context_node,

        lo_nd_data  TYPE REF TO if_wd_context_node.

  lo_context = lo_api_interfacecontroller->get_context( ).

  lo_root_node = lo_context->root_node.

Regards,

Fareez

chengalarayulu
Active Contributor
0 Kudos

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

  lo_interfacecontroller =   wd_this->wd_cpifc_alv_ref( ).

  DATA lo_api_interfacecontroller TYPE REF TO if_wd_controller.

  lo_api_interfacecontroller = lo_interfacecontroller->wd_get_api( ).

************

you can achieve through code wizard also.

Former Member
0 Kudos

HI Experts,

                    I have a requirement that is " how to add an url to an alv table field in webdynpro abap and when clicking on it the  associate view/website to called link should be displayed on another window".

Its Urgent,Please tell me exact answer along with proper code,because  I am new to webdynpro abap.

Thanks

amy_king
Active Contributor
0 Kudos

Hi Manoj,

Welcome to SCN. You should try to search SCN before posting a question since it is likely your question has been discussed before. If you cannot find an answer, please create a new discussion since this discussion is about a different requirement and is also old (from April 2012).

The may be helpful to you.

In the mean time, the demo component SALV_WD_TEST_TABLE_EDIT should help you for your requirement. Take a look at the column named URL.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy King,

                        first of all thank u for your reply.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,


Refer to the below link for adding hyper link to ALV Column.

http://webdynproabap.wordpress.com/2012/10/30/alv-with-link-to-action/

Best regards,

Arun Krishnamoorthy

Former Member
0 Kudos

Hi Arun Krishnamoorthy,

                                             Thank you verymuch for your reply.Its very great help to me.The explanation was very clear.

Thanks,

Manoj

Former Member
0 Kudos

Hi Arun Krishnamoorthy,

                                             Thank you verymuch for your reply.Its very great help to me.The explanation was very clear.

Thanks,

Manoj

Former Member
0 Kudos

Hi Arun Krishnamoorthy,

                                             Thank you verymuch for your reply.Its very great help to me.The explanation was very clear.

Thanks,

Manoj