Posted: Tue May 27, 2008 3:39 pm Post subject: Примечания к ALV
Я вывожу таблицу ALV через REUSE_ALV_GRID_DISPLAY
Перед таблицей у меня выводится заголовок (slis_listheader).
Мне надо, чтобы после таблицы тоже выводился текст с комментариями.
Т.е. что-то вроде уже имеющегося заголовка, но только внизу под таблицей.
Как это можно сделать?
Такой пример от братьев индийцев не подойдет?
Соотвественно код из top_of_pages перенести в end_of_lists.
Code:
*-- For Events
TYPE-POOLS:
slis.
DATA: BEGIN OF it_tab OCCURS 0.
INCLUDE STRUCTURE sflight.
DATA: END OF it_tab.
DATA: it_fctab1 TYPE slis_t_fieldcat_alv.
DATA: it_events TYPE slis_t_event.
DATA: st_event LIKE LINE OF it_events.
DATA: g_repid LIKE sy-repid.
START-OF-SELECTION.
SELECT * FROM sflight INTO TABLE it_tab.
*-- For Events
PERFORM get_eventlist.
*-- For ALV Display.
PERFORM alv_display.
*---------------------------------------------------------------------
** Form GET_EVENTLIST
*---------------------------------------------------------------------
FORM get_eventlist.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_events[]
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE it_events WITH KEY name = slis_ev_top_of_page
INTO st_event.
IF sy-subrc EQ 0.
st_event-form = 'TOP_OF_PAGES'.
modify it_events from st_event index sy-tabix.
ENDIF.
READ TABLE it_events WITH KEY name = slis_ev_end_of_page
INTO st_event.
IF sy-subrc EQ 0.
st_event-form = 'END_OF_PAGES'.
modify it_events from st_event index sy-tabix.
ENDIF.
READ TABLE it_events WITH KEY name = slis_ev_top_of_list
INTO st_event.
IF sy-subrc EQ 0.
st_event-form = 'TOP_OF_LISTS'.
modify it_events from st_event index sy-tabix.
ENDIF.
READ TABLE it_events WITH KEY name = slis_ev_end_of_list
INTO st_event.
IF sy-subrc EQ 0.
st_event-form = 'END_OF_LISTS'.
modify it_events from st_event index sy-tabix.
ENDIF.
ENDFORM. "get_eventlist
*---------------------------------------------------------------------*
* FORM TOP_OF_PAGES *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM top_of_pages.
WRITE:/ 'top-of-page'.
DATA :lt_top_of_page TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = 'TOP OF PAGES FOR LIST'.
APPEND ls_line TO lt_top_of_page.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Author'.
ls_line-info = 'Maheswar.A.U.'.
APPEND ls_line TO lt_top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = lt_top_of_page.
ENDFORM. "top_of_pages
*---------------------------------------------------------------------*
* FORM TOP_OF_LISTS *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM top_of_lists.
WRITE:/ 'top-of-list'.
ENDFORM. "top_of_lists
*---------------------------------------------------------------------*
* FORM END_OF_LISTS *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM end_of_lists.
DATA: lt_end_of_lists TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
CLEAR ls_line.
ls_line-typ = 'H'. "H = Header, S = Selection, A = Action
ls_line-info = 'END OF LIST'.
APPEND ls_line TO lt_end_of_lists.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Author'.
ls_line-info = 'Maheswar.A.U.'.
APPEND ls_line TO lt_end_of_lists.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.