Skip to Content

Freeze column of CL_GUI_COLUMN_TREE

Jul 25, 2017 at 01:11 PM


avatar image


my programm is using an CL_GUI_COLUMN_TREE object to desplay results. Some users asked me if I can freeze the second column while the list is scrolled horizontally.

I did not find anything than adding the second column as a hirarchy column also (method add_hierarchy_column), which looks mheee.

How can I freeze this column like in e.g. cl_gui_alv_grid?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sandra Rossi Jul 25, 2017 at 08:18 PM

I never saw such a feature with the column tree control ! I don't find any method or property for that too (cf attached file with content of wdttree.ocx: wdttreeocx.txt )

wdttreeocx.txt (34.3 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Sandra,

I don't understand. Is there another interface than CL_GUI_COLUMN_TREE to the native tree object accessible from ABAP?


The only thing you can do is to use the "list tree" (see demo program SAPTLIST_TREE_CONTROL_DEMO) instead of the "column tree". You'll have to rewrite your program. Move the column to "freeze" from the "list" of columns to the "hierarchy" column. The horizontal scrollbar is only on the "list" of columns if I remember well. The result will be ugly though. But I guess the user won't accept this solution.

PS: in my previous answer, wdttree.ocx is the GUI control at Windows side, which is used for all tree controls (CL_GUI_COLUMN_TREE, etc.) The TXT file I have attached is the interface of the OCX obtained by a custom program using the "TypeLib Information" DLL (tlbinf32.dll). Try yourself, in this TXT file, look for words "freez", "froz", "fix", etc., and you'll see that there's no result.


Another solution is to use the HTML Viewer. Again, you will have to rewrite your program.