‎2005 Jun 07 9:01 AM
Hi all,
I've implemented a very simple alv grid control.
The problem is: "the top of pages does not appear".
I think I correctly register the event, infact if i change the view in "LIST OUTPUT" the top of page appears.
What have I to do to display this print event?
I have put some variable in the screen?
Thanks all
Enzo
‎2005 Jun 07 9:36 AM
Thats nothing to do with code. Sometimes GUI patch will solve that problem.
Regards,
Vijay S
‎2005 Jun 07 9:36 AM
Thats nothing to do with code. Sometimes GUI patch will solve that problem.
Regards,
Vijay S
‎2005 Jun 07 9:59 AM
‎2005 Jun 07 9:40 AM
Hi,
In general to display values in top-of-page you have to register the TOP_OF_PAGE event in your program. for that you have to record your form for your formal parameters to the ALV GRID. this form will be a dynamic one which will defined as below :
FORM f4000_events_init CHANGING i_events TYPE slis_t_event.
DATA: line_event TYPE slis_alv_event.
CLEAR line_event.
line_event-name = 'TOP_OF_PAGE'.
line_event-form = 'F4200_TOP_OF_PAGE'.
APPEND line_event TO i_events.
ENDFORM. " f4000_events_init
----
FORM f4200_top_of_page *
----
........ *
----
FORM f4200_top_of_page.
DATA: gs_line TYPE slis_listheader.
DATA : date_ext TYPE dsvasitsdate.
DATA : ws_date(10) TYPE c.
CLEAR: gs_line.
gs_line-typ = 'H'.
gs_line-info = text-044.
APPEND gs_line TO i_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOG'
it_list_commentary = i_header.
ENDFORM.
&----
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = ws_c_repid
i_grid_title = ws_title
is_layout = struct_grid_lset
it_fieldcat = i_grid_fcat
i_default = 'X'
i_save = 'A'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_VARIANT =
it_events = i_events
it_sort = i_sort_fcat
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = i_final
EXCEPTIONS
program_error = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Jagath