08-08-2005 9:05 PM
Hi.
I tried to found info about this, it seems to be easy, but i couldn't found it.
I have a ALV Report (with funtion module not OO).
I copied a gui status from program saplkkbl status gui: standard_fullscreen.
In the ALV i have one column editable, i could refresh the info when i push the bottom that refers the function code &REFRESH
I add a buttom in the application toolbar, i would like to execute or perform the standard funtion '&Refresh', and after that do my own code.
how could i do it?
thanks!!!
Albio.-
08-08-2005 9:42 PM
Hi,
First thing you have to do is to add event 'USER_COMMAND' to events table and pass this to it_events parameter of alv function module. ( 'REUSE_ALV_GRID_DISPLAY' ). then create a form
FORM user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
<Add your code here fro handling new button.>
r_ucomm will have ok_code for button pressed
to refresh data set
rs_selfield-refresh = con_x.
ENDFORM.
08-08-2005 10:12 PM
Hi.
Well... i'm doing my program like you told me:
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
rs_selfield-refresh = 'X'.
CASE r_ucomm.
WHEN 'CALC'. "buttom added by me
PERFORM recalcula_formula.
WHEN 'RUN'. "buttom added by me
PERFORM corre_batch_input.
endcase.
ENDFORM. "USER_COMMAND
I need to execute the standard funtion bottom '&REFRESH' before my perform 'recalcula_formula'.
08-09-2005 4:11 PM
Hi,
The changed data will be available in the internal table you are using for ALV. Need not to do refresh. Just check this SAP standard program BCALV_FULLSCREEN_GRID_EDIT.
Regards,
Gagan