PDA

Ver la Versión Completa : Como agregar Botón "Refrescar" (F8) en un Reporte ALV Grid .. ?


gnes6
20/07/11, 15:56:37
Saludos a todos,

Favor me ayudan con esto :)

Cómo puedo agregar el Botón "Refrescar" (F8) a un Reporte ALV generado con la función 'REUSE_ALV_GRID_DISPLAY´...........?

Mauricio Hidalgo
25/07/11, 16:13:12
1. usar los parámetro de exporting siguientes.
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
2. crear los siguientes forms

form user_command using ucomm like sy-ucomm selfield type slis_selfield.
data: valor_x(20) type c.
selfield-refresh = 'X'.
case ucomm.
when 'REFRESCAR'.
perform data_retrieval.
when 'BACK'.
leave to screen 0.
endcase.
endform. "USER_COMMAND

form set_pf_status using rt_extab type slis_t_extab.
data w_fcode type slis_extab.
w_fcode-fcode = '&REFRESH'.
append w_fcode to rt_extab.
set pf-status 'STANDARD_FULLSCREEN' excluding rt_extab.
endform.

aquí estoy eliminando el refresh del la toolbar que trae el status que a continuación menciono.

3. Copiar desde el mismo grupo de funciones de la REUSE_ALV_GRID_DISPLAY
el status STANDARD_FULLSCREEN a tu programa.
4. Agregar a este estatus tu propia función yo en el paso 2 la llame REFRESCAR (que original jajaj).


Con eso debería ser capaz de tener tu propio refresh.


Saludos

gnes6
28/07/11, 15:48:06
1. usar los parámetro de exporting siguientes.
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
2. crear los siguientes forms

form user_command using ucomm like sy-ucomm selfield type slis_selfield.
data: valor_x(20) type c.
selfield-refresh = 'X'.
case ucomm.
when 'REFRESCAR'.
perform data_retrieval.
when 'BACK'.
leave to screen 0.
endcase.
endform. "USER_COMMAND

form set_pf_status using rt_extab type slis_t_extab.
data w_fcode type slis_extab.
w_fcode-fcode = '&REFRESH'.
append w_fcode to rt_extab.
set pf-status 'STANDARD_FULLSCREEN' excluding rt_extab.
endform.

aquí estoy eliminando el refresh del la toolbar que trae el status que a continuación menciono.

3. Copiar desde el mismo grupo de funciones de la REUSE_ALV_GRID_DISPLAY
el status STANDARD_FULLSCREEN a tu programa.
4. Agregar a este estatus tu propia función yo en el paso 2 la llame REFRESCAR (que original jajaj).


Con eso debería ser capaz de tener tu propio refresh.


Saludos


MUCHAS GRACIAS MAURICIO POR TU RESPUESTA..! 10+