on 11-10-2010 6:50 AM
Hi,
I devloped ALV in TABScript, Output is perfect in the form of ALV
In ALV , I want to set one colument as LinktoUrl such that , if I double click column to display next view based on that row.
I can able to set one column as Linkto URL in TABLE but ALV how to set specific column as linktoURL.
for ALV, Taken ViwcontainerUIelemnt , Such that I am unable to see any columns.
How to Set specific column as interactivlink to goto next view.
Thanks,
Sam
hi , write this in wdinit of your view
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
DATA l_column TYPE REF TO cl_salv_wd_column.
DATA lr_link1 TYPE REF TO cl_salv_wd_uie_link_to_action.
DATA lr_function_settings TYPE REF TO if_salv_wd_function_settings.
DATA lr_standard_function TYPE REF TO if_salv_wd_std_functions.
lo_cmp_usage = wd_this->wd_cpuse_alv_isr( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv_isr( ).
lv_value = lo_interfacecontroller->get_model(
).
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'DOC_NUM'
RECEIVING
value = l_column.
CREATE OBJECT lr_link1.
CALL METHOD lr_link1->set_text_fieldname
EXPORTING
value = 'DOC_NUM'.
CALL METHOD l_column->set_cell_editor
EXPORTING
value = lr_link1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey Samprith,
is your requirement is single click or double clcik?
link to url will not is a single click action, i dont think there is a way to impliment double click actions in wda.
for to create link to action use the follwoign code.
1) first declare salv_wd_table as compusage.
2) in doinit or any other mehtod of perticualr view first get the reference of used comp controller.
3) then get the ref of used comp model.
use code wizard for easiness.
Create component usage for alv component
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_grade_alv( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
Get config model
DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_grade_alv( ).
DATA: l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model( ).
set visible row count
l_value->if_salv_wd_table_settings~set_visible_row_count( '10' ).
DATA: lr_column TYPE REF TO cl_salv_wd_column,
lr_column_1 TYPE REF TO cl_salv_wd_column,
lr_column_2 TYPE REF TO cl_salv_wd_column.
DATA :lo_header TYPE REF TO cl_salv_wd_column_header,
lv_header TYPE string.
DATA: lr_link TYPE REF TO cl_salv_wd_uie_link_to_action.
lr_column = l_value->if_salv_wd_column_settings~get_column( 'COUNT' ).
CREATE OBJECT lr_link.
lr_link->set_text_fieldname( 'COUNT' ).
lr_column->set_cell_editor( lr_link ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'GRADE' ).
CREATE OBJECT lr_link.
lr_link->set_text_fieldname( 'GRADE' ).
lr_column->set_cell_editor( lr_link ).
lo_header = lr_column->create_header( ).
lv_header = cl_wd_utilities=>get_otr_text_by_alias( alias = 'ZOPI_APPLICATION/GRADE' ).
lo_header->set_text( lv_header ).
ENDMETHOD.
regards,
Kranthi.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.