Kolkata, India.
Problem:
Normally in ALV grid TOP_OF_PAGE, we cannot display information of more than 60 characters long. This is due to the limitation of the FM REUSE_ALV_COMMENTARY_WRITE. Usually we call this FM from the subroutine that is linked with TOP_OF_PAGE event.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary =
i_logo =
i_end_of_list_grid =
.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(IT_LIST_COMMENTARY) TYPE SLIS_T_LISTHEADER
*" REFERENCE(I_LOGO) OPTIONAL
*" REFERENCE(I_END_OF_LIST_GRID) OPTIONAL
*"----------------------------------------------------------------------
*---------------------------------------------------------------------*
* FORM html_top_of_page *
*---------------------------------------------------------------------*
FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
data: l_text(255) type c.
do 180 times.
l_text+sy-index(1) = '*'.
enddo.
CALL METHOD top->add_text EXPORTING text = 'Hello world '
sap_style = 'heading' .
CALL METHOD top->add_gap EXPORTING width = 200.
CALL METHOD top->add_picture EXPORTING picture_id = 'ENJOYSAP_LOGO'.
CALL METHOD top->NEW_LINE( ).
CALL METHOD top->add_text EXPORTING
text = l_text.
ENDFORM.
* Display ALV grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
i_callback_program = g_repid
i_structure_name = 'SFLIGHT'
TABLES
t_outtab = gt_outtab.
Output:
Limitations:
No comments:
Post a Comment