Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Alv-tree --> refresh button

Former Member
0 Likes
494

Hi, all

In my ABAP program,

i used handle_item_double_click method and then called the other program to change the data

and in alv tree items-data changed .

So I have to use refresh icon .

i created button but i don't know how refresh alv_tree .

Would anyone out there be able to help.

Many thanks

Aysenur

FORM mls_item_double_click

USING i_node_key TYPE lvc_nkey

i_fieldname type lvc_fname .

DATA : lf_mls LIKE itab .

CLEAR : lf_mls .

READ TABLE gt_itabyaz INTO lf_mls INDEX i_node_key .

IF sy-subrc = '0' AND lf_mls-detay = 'X' .

DATA : rs_selfield TYPE slis_selfield .

kytindex = i_node_key .

CONCATENATE 'ITAB-' i_fieldname INTO rs_selfield-sel_tab_field .

move i_fieldname TO rs_selfield-fieldname .

IF rs_selfield-fieldname = 'ACK' .

READ TABLE itab INDEX kytindex .

CHECK sy-subrc = '0' .

IF NOT itab-detay IS INITIAL .

SUBMIT zxx_tr_dev_pxx .

WITH p_bukrs EQ s_bukrs-low

WITH p_sno EQ itab-sno

WITH s_tarih IN s_vtrh AND RETURN.

k_vtrh[] = s_vtrh[] .

nyt_vb = itab.

PERFORM yaz_genel_dzlt USING nyt_vb.

PERFORM son_kolon .

itab = nyt_vb .

endif.

ENDFORM. " MLS_NODE_DOUBLE_CLICK

*&----


*& Form change_toolbar

*&----


FORM change_toolbar .

CALL METHOD g_alv_tree->get_toolbar_object

IMPORTING

er_toolbar = g_toolbar.

CHECK NOT g_toolbar IS INITIAL.

CALL METHOD g_toolbar->add_button

EXPORTING

fcode = ''

icon = ''

butn_type = cntb_btype_sep.

CALL METHOD g_toolbar->add_button

EXPORTING

fcode = 'EXCEL'

icon = '@X__XLS@'

butn_type = cntb_btype_button

text = ' Excele Aktar'

quickinfo = text-901. "Information

CALL METHOD g_toolbar->add_button

EXPORTING

fcode = 'REFRESH'

icon = '@42@'

butn_type = cntb_btype_button

text = 'Refresh'

quickinfo = 'Ekran Tazeleme' . "Information

CREATE OBJECT toolbar_event_receiver.

SET HANDLER toolbar_event_receiver- FOR g_toolbar.

SET HANDLER toolbar_event_receiver->on_toolbar_dropdown

FOR g_toolbar.

ENDFORM. " change_toolbar

*----


  • CLASS lcl_toolbar_event_receiver IMPLEMENTATION

*----


class lcl_toolbar_event_receiver implementation.

method on_function_selected.

case fcode.

when 'EXCEL'.

perform excel.

when 'REFRESH'.

???????

endcase .

call method g_alv_tree->frontend_update.

endmethod.

1 REPLY 1
Read only

Former Member
0 Likes
374

Hi

just give to refresh

when 'REFRESH'.

<b>clear itab[].</b>

endcase .