Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV list heading

Former Member
0 Likes
840

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

1 ACCEPTED SOLUTION
Read only

former_member185931
Participant
0 Likes
808

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.

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

4 REPLIES 4
Read only

former_member185931
Participant
0 Likes
809

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.

Read only

0 Likes
808

Jagraj,

I am already doing all that stuff and appending to the internal table I am passing to that function module.

Still no luck.

Read only

0 Likes
808

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?.

Read only

0 Likes
808

Jagraj,

Thanks for the replies. Actually I missed the event catalog table.

Thanks,