Skip to Content
0
Former Member
Jul 23, 2009 at 01:42 AM

Multiple lines displayed in top of page for ALV GRID DISPLAY

620 Views

Hi friends,

system: ECC 6.0

object : ALV GRID DISPLAY

issue: TOP OF PAGE.

I have a table maintenance program for which I display a report for status of the record, if they were updated or errored out coz of some reason.

When the alv grid report is displayed, and if I click on any row it creates a duplicate record in the top of page, even when i try to download it has duplicate entry for the top of page.

for ex: before clicking any row

Hyperian Master data Maintenance report

Date: 22.07.2009

Time: 21:23:07

after clicking any row

Hyperian Master data Maintenance report

Hyperian Master data Maintenance report

Date: 22.07.2009

Time: 21:23:07

Date: 22.07.2009

Time: 21:23:07

Below is the code being used for top of page and alv grid display.

CLEAR ls_event.

ls_event-name = 'TOP_OF_PAGE'.

ls_event-form = 'F_TOP_OF_PAGE'.

APPEND ls_event TO gt_events.

s_header-typ = 'H'.

s_header-info = 'Hyperian Master data Maintenance report'.

APPEND s_header TO t_header.

CLEAR s_header.

s_header-typ = 'S'.

s_header-key = 'Date: '.

CONCATENATE sy-datum6(2) '.' sy-datum4(2) '.' sy-datum(4) INTO s_header-info. "todays date

APPEND s_header TO t_header.

CLEAR: s_header.

s_header-typ = 'S'.

s_header-key = 'Time: '.

CONCATENATE sy-uzeit(2) ':' sy-uzeit2(2) ':' sy-datum4(2) INTO s_header-info. "todays time

APPEND s_header TO t_header.

CLEAR: s_header.

APPEND s_header TO t_header.

CLEAR: s_header.

  • Total No. of Records Updated

DESCRIBE TABLE t_insert LINES lu_lines.

lu_linesc = lu_lines.

CONCATENATE 'Total No. of Records Uploaded: ' lu_linesc

INTO tu_line SEPARATED BY space.

s_header-typ = 'A'.

s_header-info = tu_line.

APPEND s_header TO t_header.

CLEAR: s_header, tu_line.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = t_header.

gd_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = gd_repid

i_callback_top_of_page = 'F_TOP_OF_PAGE'

is_layout = gd_layout

it_fieldcat = fieldcatalog[]

it_events = gt_events

TABLES

t_outtab = t_hyperion.

IF sy-subrc <> 0.

MESSAGE e004(zsd_01). "no record exist

LEAVE LIST-PROCESSING.

ENDIF.

Please suggest me to solve this issue.