Skip to Content
0
Former Member
May 15, 2007 at 08:52 AM

ALV events

9 Views

Hi.

I need to insert an image in an ALV. This image is at the top_of_page and she appears in the screen when I run the program but when I print the ALV the image doesn't appear in the header of each page. Besides if I put a text at the top of page this appears in each page when I run the program and when I print it too.

Somebody can help me??.

Thank you.

Down it is the code that I use:

PERFORM preparar_alv.

  • Salida del Layout.

PERFORM alv_show.

....................................

********************

FORM preparar_alv .

PERFORM sub_alv_events.

PERFORM layout_allg_build USING gs_layout.

ENDFORM. " preparar_alv

........................................

*********************

FORM sub_alv_events .

DATA: ls_event TYPE slis_alv_event.

CLEAR gt_events. REFRESH gt_events.

CLEAR ls_event.

ls_event-name = slis_ev_top_of_page.

ls_event-form = 'TOP_OF_PAGE'.

APPEND ls_event TO gt_events.

CLEAR ls_event.

ls_event-name = slis_ev_end_of_page.

ls_event-form = 'END_OF_PAGE'.

APPEND ls_event TO gt_events.

ENDFORM. " sub_alv_events

  • TOP_OF_PAGE ***

FORM top_of_page.

DATA: ls_header TYPE slis_listheader.

CLEAR gt_header_top. REFRESH gt_header_top.

CLEAR ls_header.

ls_header-typ = 'H'.

ls_header-info = 'CÁLCULO DE PRECIOS DE VENTA'.

APPEND ls_header TO gt_header_top.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = gt_header_top

i_logo = 'ZCAB_HSOP'

  • I_END_OF_LIST_GRID =

.

ENDFORM. "top_of_page

  • END_OF_PAGE ***

FORM end_of_page.

PAG = SY-PAGNO.

CONCATENATE 'Página' PAG INTO PAGINA.

WRITE: PAGINA RIGHT-JUSTIFIED .

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = gt_header_top

i_logo = 'ENJOYSAP_LOGO'

  • I_END_OF_LIST_GRID =