HI ALL, (my english is not as well as somme of you. So sorry)
I've created an ALV grid and added a refresh button whitch just have to re-execute the main program.
Double clicking on ALV calls correctly the transaction i want.
But the problem is that the refresh button seems inactive. I've put a break poit to see if it go's to the USER_COMMAND form an nothing is going on.
Please check the following parts of ABAP code :
----
FORM build_alv_grid *
----
FORM build_alv_grid.
DATA i_repid LIKE sy-repid.
Store report name
i_repid = sy-repid.
Call for ALV list display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = i_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_end_of_page = 'END-OF-PAGE' "see FORM
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = fieldcatalog[]
it_events_exit = gt_events
is_print = gd_prntparams
i_save = 'X'
TABLES
t_outtab = wt_zcdgc_r
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "Build_alv_grid
----
FORM USER_COMMAND *
----
--> R_UCOMM *
--> RS_SELFIELD *
----
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA : BEGIN OF s_seltab OCCURS 5.
INCLUDE STRUCTURE rsparams.
DATA : END OF s_seltab.
break frmmo5.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE wt_zcdgc_r INDEX rs_selfield-tabindex.
SET PARAMETER ID 'ZCC' FIELD wt_zcdgc_r-ccde.
SET PARAMETER ID 'AUN' FIELD wt_zcdgc_r-nocde.
Execute transaction ZPHMF, and skip initial data entry screen
CALL TRANSACTION 'ZPHMF' AND SKIP FIRST SCREEN.
WHEN '&REFRESH'.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = 'Z04R9003'
TABLES
selection_table = s_seltab
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc = 0.
execute program one more time
SUBMIT Z04R9003
WITH SELECTION-TABLE s_seltab .
ELSE.
*If Error occurs.
MESSAGE e004(mesclass).
ENDIF.
ENDCASE.
ENDFORM.
----
FORM PF_STATUS_SET *
----
FORM pf_status_set USING ut_extab TYPE slis_t_extab. "#EC CALLED
DELETE ut_extab WHERE fcode = gc_refresh.
SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'
EXCLUDING ut_extab.
ENDFORM. "pf_status_set