cancel
Showing results for 
Search instead for 
Did you mean: 

Making a column a hyperlink in ALV

Former Member
0 Kudos

Hi,

I have an application in which I am showing the output in the alv. Now I want to make the values in one column of the alv table a hyperlink, so that on clicking of that further details can be opened. Please suggest how do I do that.

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Code to make the require column a link

DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.

DATA: LR_INTF_CTRL TYPE REF TO IWCI_SALV_WD_TABLE.

DATA: LR_MODEL TYPE REF TO CL_SALV_WD_CONFIG_TABLE.

DATA: LR_COLUMN TYPE REF TO CL_SALV_WD_COLUMN.

DATA: LR_LINK TYPE REF TO CL_SALV_WD_UIE_LINK_TO_ACTION.

LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).

IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.

LR_CMP_USAGE->CREATE_COMPONENT( ).

ENDIF.

LR_INTF_CTRL = WD_THIS->WD_CPIFC_ALV( ).

LR_MODEL = LR_INTF_CTRL->GET_MODEL( ).

LR_COLUMN = LR_MODEL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN(

ID = '<Column field name>' ).

CREATE OBJECT LR_LINK.

LR_LINK->SET_TEXT_FIELDNAME( 'RRNUM' ).

Subscribe ON_CLICK event of ALV Interface Controller and handle the event.

Abhi

Former Member
0 Kudos

Hi,

When I am writing this code in the view , I am getting the following error,:

Method "WD_CPUSE_ALV" is unknown or protected or private.

Please suggest how to remove the error.

anand_nidamanuru
Active Participant
0 Kudos

Hi Ashu,

it is just the usage...

Suppose you have given the ALV component usage as MY_ALV

then that particular method name will be

wd_cpuse_MY_ALV