11-28-2007 3:48 PM
Hi All
i want clear header when i excute report header displyed after when i go back header displaying agian not clearing header info,,when i go back i need to come out this programe now header displaying , now its 2 times i am gng back, pls if any one knws where should i clear that header i dont want to display again when i go back immediately need to go out of the program.
My code:
FORM TOP-OF-PAGE.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = ' HR Master Data Records'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
sort it_pa0001 by pernr.
describe table IT_PA0001 lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
11-29-2007 3:37 PM
11-29-2007 3:41 PM
Hi
One question when you say going back u are coming to the selection screen or u want to be on the same screen.
Try to clear t_header at different places and check u r self.
Hope it helps.
Thanks,
chaithanya.
11-29-2007 3:44 PM
Hi
After reuse_alv_grid or alv display.. You can clear the header. When u hit back button also u can clear the header in the user command writing a case statement.
Thanks,
chaithanya.