‎2007 Aug 09 10:39 PM
hello guys,
I am using an alv GRID, but now I need to write some header at the top. This is part of the code that I have, and is not working (for the header), the box at the top does appear, but empty, without text.:
EVENT TOP OF PAGE
clear v_event.
v_event-name = SLIS_EV_TOP_OF_PAGE.
v_event-form = 'DATA_TOP_OF_PAGE'.
append v_event to events_data.
SHOWING THE GRID
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = layout_data
it_fieldcat = gt_fieldcat_data[]
it_events = events_data
TABLES
t_outtab = gt_data.
FORM AFTER EVENT TOP OF PAGE
Form DATA_TOP_OF_PAGE.
data: texto type string,
f type string,
t type string.
clear heading1.
heading1-typ = 'H'.
heading1-info = 'some title'.
heading1-key = ''.
append heading1.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = heading1[]
exceptions
others = 1.
form.
Like I said, the box at the top appeas, but without any text.
Thanks a lot,
Javier
‎2007 Aug 09 10:51 PM
Try passing just heading1 instead of heading1[] to the 'REUSE_ALV_COMMENTARY_WRITE' function call. Everything else looks ok.
‎2007 Aug 09 10:55 PM
‎2007 Aug 09 11:12 PM
Hi,
Try this way
* EVENT TOP OF PAGE
clear v_event.
v_event-name = 'TOP_OF_PAGE'.
v_event-form = 'TOP_OF_PAGE'.
append v_event to events_data.
* SHOWING THE GRID
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = layout_data
it_fieldcat = gt_fieldcat_data[]
it_events = events_data
TABLES
t_outtab = gt_data.
* FORM AFTER EVENT TOP OF PAGE
Form TOP_OF_PAGE.
data: texto type string,
f type string,
t type string.
clear heading1.
heading1-typ = 'H'.
heading1-info = 'some title'.
heading1-key = ''.
append heading1.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = heading1[]
exceptions
others = 1.
aRs