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

write commentary

Former Member
0 Likes
618

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

3 REPLIES 3
Read only

Former Member
0 Likes
571

Try passing just heading1 instead of heading1[] to the 'REUSE_ALV_COMMENTARY_WRITE' function call. Everything else looks ok.

Read only

0 Likes
571

I seems it doesn't work.

Read only

former_member194669
Active Contributor
0 Likes
571

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