2011 Sep 21 5:06 AM
Hello All,
I have developed one ALV program on some "Z" tables which are filling through interface.I am getting correct output after executing it but if I try to execute same report in another session after 5 min time with same selection parameters then i will get output but not those records which are updated in those "Z" tables in between that time interval.
Could you please tell me how to acheive this.
Regards,
Sachin
Moving to ABAP Forum <SAP XI Moderator>
Edited by: Aashish Sinha on Sep 21, 2011 6:38 AM
Hello All,
I have developed one ALV program on some "Z" tables which are filling through interface.I am getting correct output after executing it but if I try to execute same report in another session after 5 min time with same selection parameters then i will get output but not those records which are updated in those "Z" tables in between that time interval.
Could you please tell me how to acheive this.
Regards,
Sachin
Moving to ABAP Forum <SAP XI Moderator>
Edited by: Aashish Sinha on Sep 21, 2011 6:38 AM
2011 Sep 21 5:58 AM
Hi ,
One option is to put refresh button in application tool bar. Once you click that button , fetch the data from that ztable again and display the output.
Thanks,
Srikanth.A
2011 Sep 21 6:20 AM
Hi Sachin,
Are you specifying the time interval in the selection screen?
Regards,
Asit
2011 Sep 21 6:33 AM
Hi,
Is your Z-table a fully buffered table ?
Danish.
Edited by: Danish2285 on Sep 21, 2011 11:03 AM
2011 Sep 21 7:08 AM
Your question is confusing, your refresh button is not working or your report itself not displaying the newly updated data in z tables when you re-execute after a few minutes?
Edited by: Jeevan Sagar on Sep 21, 2011 1:15 AM
2011 Sep 21 7:17 AM
Class Definitio,
CLASS lcl_event_receiver DEFINITION .
PUBLIC SECTION .
METHODS:
*--To implement user commands
handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm,
Method to handle toolbar
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive, "#EC *
ENDCLASS . "lcl_event_handler DEFINITION
class lcl_event_receiver implementation.
method handle_toolbar.
add push button to the alv tool bar
clear ls_toolbar.
move 'REFR' to ls_toolbar-function.
move 'Refresh' to ls_toolbar-quickinfo.
move ' ' to ls_toolbar-disabled.
append ls_toolbar to e_object->mt_toolbar.
endmethod.
Logic to handle the push button
METHOD handle_user_command.
To handle user command
PERFORM handle_user_command USING e_ucomm .
ENDMETHOD. " METHOD HANDLE_USER_COMMAND
Endclass.
Handle Refresh Button
FORM handle_user_command USING p_ucomm TYPE any.
IF p_ucomm EQ 'REFR'.
CALL METHOD g_alv_grid->refresh_table_display.
ENDIF.
ENDFORM. "handle_user_command
ALV call
call method g_alv_grid->set_table_for_first_display
exporting i_structure_name = 'SFLIGHT'
is_layout = gs_layout
changing it_outtab = gt_sflight.
create object event_receiver.
set handler event_receiver->handle_user_command for grid1.
set handler event_receiver->handle_toolbar for grid1.
call method g_alv_grid->set_toolbar_interactive.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |