Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3353

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

$
0
0

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:

1.PNG

 

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

2.PNG


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


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>