2005 Oct 07 4:09 PM
Hello ABAPers,
I am displaying some records in an internal table in the form of an ALV list.
I need 'Number of records displayed: xxx' at the header level or at the end of the list.
(xxx number of records in the internal table)
I am using the function module and calling this in form top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_list_top_of_page.
but it seems like it is not working. Any suggestions.
Thanks,
Naren
Message was edited by: Naren Somen
2005 Oct 07 4:22 PM
You have to fill the Record count into this table, with
describe <itab> lines <record_count>
data: ls_line type slis_listheader.
data: c_date(12), c_time(12).
LIST HEADING LINE: TYPE H
clear ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: NOT USED FOR THIS TYPE
write p_datum to c_date.
concatenate sy-title 'as of' c_date into ls_line-info.
ls_line-info = sy-title.
append ls_line to lt_top_of_page.
2005 Oct 07 4:22 PM
You have to fill the Record count into this table, with
describe <itab> lines <record_count>
data: ls_line type slis_listheader.
data: c_date(12), c_time(12).
LIST HEADING LINE: TYPE H
clear ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: NOT USED FOR THIS TYPE
write p_datum to c_date.
concatenate sy-title 'as of' c_date into ls_line-info.
ls_line-info = sy-title.
append ls_line to lt_top_of_page.
2005 Oct 07 4:36 PM
Jagraj,
I am already doing all that stuff and appending to the internal table I am passing to that function module.
Still no luck.
2005 Oct 07 4:46 PM
then you are not passing the top_of_page form name to the ALV_display function.
give g_top_of_page the form name where you are calling this function header function.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_background_id = 'ALV_BACKGROUND'
i_callback_program = g_repid
i_callback_user_command = g_user_command
i_callback_top_of_page = g_top_of_page
it_fieldcat = fieldcat
is_layout = gs_layout
i_save = g_save
is_variant = gs_variant
it_events = gt_events
importing
e_exit_caused_by_caller = g_exit_caused_by_caller
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = itabrep
exceptions
program_error = 1
others = 2.
Please check?.
2005 Oct 07 5:11 PM
Jagraj,
Thanks for the replies. Actually I missed the event catalog table.
Thanks,