cancel
Showing results for 
Search instead for 
Did you mean: 

Link on ALV Output Column

Former Member
0 Kudos

Hi Experts,

In my ALV output table i want to put a link for one column so that when user click on that link it'll call another view of the same applications .Please remember the output is on ALV not in any table .

Please give me solution.

Regards,

Satya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

*alv

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

lo_cmp_usage = wd_this->wd_cpuse_usage_alv_logs( ).

IF lo_cmp_usage->has_active_component( ) IS INITIAL.

lo_cmp_usage->create_component( ).

ENDIF.

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

lo_interfacecontroller = wd_this->wd_cpifc_usage_alv_logs( ).

DATA lv_value TYPE REF TO cl_salv_wd_config_table.

lv_value = lo_interfacecontroller->get_model( ).

DATA: lr_column TYPE REF TO cl_salv_wd_column.

lr_column = lv_value->if_salv_wd_column_settings~get_column( 'APPLICATIONLOG').

  • Display link in column connid

DATA: lr_link TYPE REF TO cl_salv_wd_uie_link_to_action.

lr_column = lv_value->if_salv_wd_column_settings~get_column( 'APPLICATIONLOG' ).

CREATE OBJECT lr_link.

lr_link->set_text_fieldname( 'APPLICATIONLOG' ).

lr_column->set_cell_editor( lr_link ).

Former Member
0 Kudos

Hi Sridevi,

Thanks for the replay .But all my output is coming in ALV now i just want to put the link to the field .So can it be possible with ur code .

Thanks,

Satya

Former Member
0 Kudos

My problem is already solved .

Thanks to all for there help.

Former Member
0 Kudos

Hi, Satya

I have the same problem, Can you give me your source

code?

Thanks you very much!

Former Member
0 Kudos

Hi Li,

Can you please let me know what exactly your problem.

-Satya

Former Member
0 Kudos

Hi, Satya

I want to know how to solve this issue?

Can you show the source code to me?

Thanks you!

Edited by: Ken.Li on Jul 3, 2008 3:36 AM

Former Member
0 Kudos

If you are using the ALV, then you have first create a event handler of event type ON_CLICK. And inside the event hadler u have to write the code to call the other WD Applicatiom.

IF you are calling through OBN in the poral then here is the code

l_api_component = wd_comp_controller->wd_get_api( ).

l_portal_manager = l_api_component->get_portal_manager( ).

if r_param->COLUMN = 'SALE_ORDER'.

CALL METHOD l_portal_manager->navigate_to_object

EXPORTING

system = 'SAP_R3'

object_type = 'com.amd.obn.so'

operation = 'SALESORDER'

business_parameters = lt_params

USE_FORWARDPARAMETERS_OF_AL = abap_true.

ELSE.

CALL METHOD l_portal_manager->navigate_to_object

EXPORTING

system = 'SAP_R3'

object_type = 'com.amd.obn.ship'

operation = 'SHIPMENT'

business_parameters = lt_params

FORWARD_OBN_METADATA = ABAP_TRUE

USE_FORWARDPARAMETERS_OF_AL = ABAP_TRUE.

ENDIF.

.

Regards,

Satya

Former Member
0 Kudos

Hi

check this code to add a link to action on a column of alv table.

first instantiate the alv component

create an attribute r_table ref to CL_SALV_WD_CONFIG_TABLE in the attributes tab.

data: lv_action type ref to cl_salv_wd_uie_link_to_action.

DATA: lr_column TYPE REF TO cl_salv_wd_column,

lr_function TYPE REF TO cl_salv_wd_function.

data:

lr_functions type ref to if_salv_wd_function_settings.

lr_functions ?= wd_this->r_table.

lr_function = lr_functions->create_function( 'MYLINKTOACTION' ).

lr_column = lo_config_model_value->if_salv_wd_column_settings~get_column( 'FLDATE' ).

CREATE OBJECT lv_action.

lv_action->set_text_fieldname( 'FLDATE' ).

lr_column->set_cell_editor( lv_action ).

create a method of type with name MYLINKTOACTION selecting the event as "on cell action".

and write the code in this method.

u can refer to standard package salv_wd_test.

in that check the component SALV_WD_TEST_TABLE_TOOLBR

regards

chythanya