*&---------------------------------------------------------------------*
*& Form build_alv_events
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM build_alv_events TABLES prt_events.
DATA: ldt_event TYPE slis_alv_event.
CLEAR ldt_event.
ldt_event-name = slis_ev_top_of_page.
ldt_event-form = 'DISPLAY_ALV_HEADER'.
APPEND ldt_event TO prt_events.
ldt_event-name = slis_ev_end_of_list.
ldt_event-form = 'DISPLAY_ALV_FOOTER'.
APPEND ldt_event TO prt_events.
ENDFORM. " build_alv_events
*&---------------------------------------------------------------------*
*& Form DISPLAY_ALV_HEADER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM display_alv_header.
DATA: ldf_pos TYPE sylinsz,
ldf_pagno(10) TYPE c.
ldf_pos = sy-linsz - 20.
WRITE sy-pagno TO ldf_pagno LEFT-JUSTIFIED.
IF NOT gdt_listheader2[] IS INITIAL.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gdt_listheader2.
ENDIF.
IF NOT ldf_pagno IS INITIAL.
WRITE: AT ldf_pos text-w01, ldf_pagno.
ENDIF.
ENDFORM. " display_alv_header
FORM display_alv_footer.
DATA: ldf_linsz TYPE sylinsz,
ldf_pos TYPE i,
ldf_len TYPE i.
ldf_linsz = sy-linsz.
ldf_pos = ldf_linsz / 2.
ldf_len = STRLEN( gdf_end_report ).
ldf_len = ldf_len / 2.
ldf_pos = ldf_pos - ldf_len.
IF NOT gdt_listfooter2[] IS INITIAL.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gdt_listfooter2.
ENDIF.
IF NOT gdf_end_report IS INITIAL AND
gdf_end_report <> space.
SKIP.
WRITE: AT ldf_pos gdf_end_report.
ENDIF.
ENDFORM.
*& Form build_alv_events
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM build_alv_events TABLES prt_events.
DATA: ldt_event TYPE slis_alv_event.
CLEAR ldt_event.
ldt_event-name = slis_ev_top_of_page.
ldt_event-form = 'DISPLAY_ALV_HEADER'.
APPEND ldt_event TO prt_events.
ldt_event-name = slis_ev_end_of_list.
ldt_event-form = 'DISPLAY_ALV_FOOTER'.
APPEND ldt_event TO prt_events.
ENDFORM. " build_alv_events
*&---------------------------------------------------------------------*
*& Form DISPLAY_ALV_HEADER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM display_alv_header.
DATA: ldf_pos TYPE sylinsz,
ldf_pagno(10) TYPE c.
ldf_pos = sy-linsz - 20.
WRITE sy-pagno TO ldf_pagno LEFT-JUSTIFIED.
IF NOT gdt_listheader2[] IS INITIAL.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gdt_listheader2.
ENDIF.
IF NOT ldf_pagno IS INITIAL.
WRITE: AT ldf_pos text-w01, ldf_pagno.
ENDIF.
ENDFORM. " display_alv_header
FORM display_alv_footer.
DATA: ldf_linsz TYPE sylinsz,
ldf_pos TYPE i,
ldf_len TYPE i.
ldf_linsz = sy-linsz.
ldf_pos = ldf_linsz / 2.
ldf_len = STRLEN( gdf_end_report ).
ldf_len = ldf_len / 2.
ldf_pos = ldf_pos - ldf_len.
IF NOT gdt_listfooter2[] IS INITIAL.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gdt_listfooter2.
ENDIF.
IF NOT gdf_end_report IS INITIAL AND
gdf_end_report <> space.
SKIP.
WRITE: AT ldf_pos gdf_end_report.
ENDIF.
ENDFORM.
No comments:
Post a Comment