2013 Jun 28 6:29 AM
Hi Experts,
I have a requirement to set ALV header which is more than 240 charecters long.As per my knowledge a header with more than 132 charecters cannot be set. I have seen in some post we can use html_top_of_page if the number of charecter is more than 240(Correct me if I am wrong).Suppose if I am using html_top_of_page will the entire(more than 240 charecters) line be displayed as a single row or whether it will be diplayed as more than one row.
Please help me on this.
Regards,
Alexander.
Dear Alex,
Top of page event we can display only 254 characters through cl_dd_document.
Please check these Code these will resolve your issue. Please point me one these code helps.
DATA : gt_ekko TYPE STANDARD TABLE OF ekko,
l_text(255) TYPE c.
START-OF-SELECTION.
SELECT * FROM ekko UP TO 10 ROWS INTO TABLE gt_ekko.
DO 254 TIMES.
l_text+sy-index(1) = '*'.
ENDDO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
i_callback_program = sy-cprog
i_structure_name = 'EKKO'
TABLES
t_outtab = gt_ekko.
*&---------------------------------------------------------------------*
*& Form html_top_of_page
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->TOP text
*----------------------------------------------------------------------*
FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
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. "html_top_of_page
Output will be
Thanks and Regards,
buz_sap
2013 Jun 28 7:10 AM
Yes,
you can upto 255 characters.
Here is an example with screenshot
http://saptechnical.com/Tutorials/ALV/TopofPage/Solution.htm
Regards,
2013 Jun 28 8:13 AM
Dear Alex,
Top of page event we can display only 254 characters through cl_dd_document.
Please check these Code these will resolve your issue. Please point me one these code helps.
DATA : gt_ekko TYPE STANDARD TABLE OF ekko,
l_text(255) TYPE c.
START-OF-SELECTION.
SELECT * FROM ekko UP TO 10 ROWS INTO TABLE gt_ekko.
DO 254 TIMES.
l_text+sy-index(1) = '*'.
ENDDO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
i_callback_program = sy-cprog
i_structure_name = 'EKKO'
TABLES
t_outtab = gt_ekko.
*&---------------------------------------------------------------------*
*& Form html_top_of_page
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->TOP text
*----------------------------------------------------------------------*
FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
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. "html_top_of_page
Output will be
Thanks and Regards,
buz_sap
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |