Deleting and reprinting ouput on screen

Question: Hello All,
I have a problem in ABAP Program.
I have few entries in selection screen,based on that a report is displayed as a list.
Now my requirement is there is a button on my output screen and on click of that I want to delete whatever is visible on screen and show new list.
If I simpy use write statements,it displays my new list on screen but if i click back button, the previous list-screen opens.I want to delete that screen or change data with my new list.
Hope it is clear,if not plaese let me know,I will provide more details.
Thanks,
Sam

Answer:
Sure.....check it. Implement the following code. Create a gui-status "LIST" and make sure that you add a button for "Refresh".

Have fun.
R Heilman


report zR_0002 .

parameters: p_check(30) type c.

start-of-selection.

  perform write_list.

at user-command.

  case sy-ucomm.

    when 'BACK'.
      leave list-processing.
    when 'REFRESH'.
      sy-lsind = sy-lsind - 1.
      perform write_list.
  endcase.

*---------------------------------------------------------------------*
*       FORM write_list                                               *
*---------------------------------------------------------------------*

form write_list.
  set pf-status 'LIST'.

  write:/ p_check, sy-uzeit.

endform.


Answer:
Hi R,

Thanks a lot! It works great!!

Sam
Copyright ?2007 - 2008 www.jt77.com