cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Interactive in webdynpro

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Akash,

Thanks for response.

When i used code

i got error at line

lo_cmp_usage = wd_this->wd_cpuse_alv_isr( ).

in my webdynpro comp , i used context for alv is EMPDATA

should i use this statment

lo_cmp_usage = wd_this->wd_ALV_COMP( ).?

componenet usage: ALV_COMP

Thanks,

Sam

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

It is easy to write the code if you use Web Dynpro COde Wizard(ctrl+f7).

In that select radio button Instantiate used compnent and then use f4 help to select your componenet. It will automatically generate code.

Former Member
0 Kudos

Please let me know . how to create ALV interactive report in webdynpro ABAP ?

Thanks,

Sam

Former Member
0 Kudos

yes try like this

lo_cmp_usage = wd_this->wd_cpuse_ALV_COMP( ).

Former Member
0 Kudos

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.

Former Member
0 Kudos

hi Kranthi,

Now I can Link in ALV webdynpro ABAP for Specific column,

How to catch value of link in selected row ?

After catching value dispaly in next view with all values of selected record.

thanks,

Sam

Answers (0)