Skip to Content
0
Former Member
Jul 01, 2016 at 03:18 PM

How to set up dynamic height (resizing) of ALV tree HTML header?

399 Views

Hey all,

I have created an ALV tree using the following classes:

go_container_tree TYPE REF TO cl_gui_custom_container,

go_alv_tree TYPE REF TO cl_gui_alv_tree,

and I also created his HTML header followingly:

DATA: lo_header TYPE REF TO cl_gui_html_viewer,

lo_dyndoc TYPE REF TO cl_dd_document.

* Get Header

CALL METHOD po_tree->get_html_header_object

CHANGING

er_html_header = lo_header.

* Build Dynamic Document

CREATE OBJECT lo_dyndoc.


" added some texts to the lo_dyndoc


lo_dyndoc->html_control = lo_header.


CALL METHOD lo_dyndoc->display_document

EXPORTING

reuse_control = 'X'

EXCEPTIONS

html_display_error = 1.

I would like to set the height of the HTML header according to the added texts (that means I do not want a vertical scrollbar)

This is how it looks like now:

And this is what I would like to achieve (resize the header according to the added text):


I tried to set it manually with the following code, but it does not work.

CALL METHOD lo_header->set_height

EXPORTING

height = 100.

How can I set the automatic resizing of the header according to the added text or at least how can I set the height of the header?

Thank you.

Regards,
RB

Attachments

1.PNG (5.0 kB)
2.PNG (7.0 kB)