2023 Nov 30 11:45 AM
Hello Everyone,
Currently I am working with a module pool program which needs to have a table control with expand/collapse(+/-) button in the first column, and the WBS elements in the second column for the project definition entered in the initial screen. Rest of the columns are from a custom table. This resembles table control in transaction CJ40/CJ30/CJ20.
Tried using cl_gui_alv_tree to bring the tree structure .But unfortunately I am unable to edit the items directly.
Highly appreciate if any sample program could be shared.
Thanks
Sivaprasad
2023 Nov 30 6:49 PM
Do you want to use Table Control (dynpro element used with ABAP "CONTROLS" keyword), or to use a Tree Control (cl_gui_alv_tree, cl_gui_column_tree and so on)?
I guess you mean a Tree Control, not a Table Control.
I don't understand why your question title is about Expand / Collapse, although you only seem to ask assistance to "edit the items directly".
What is your exact question?
2023 Dec 01 9:30 AM
Hi Sandra,
Thank you for the comment. I am trying to display the items in tree structure . I would subsequently edit the existing items in the grid and then save it.
I am able to bring the items using Tree Control (cl_gui_alv_tree). But does not allow me to edit the rows.
So, my requirement is to display the items in tree format as well as edit the rows.
2023 Dec 01 4:46 PM
Maybe I don't correctly understand "edit the rows", if you mean that the user should be able to edit the rows the same way as they can edit the values in an ALV Grid, it's not possible. A Tree Control is not Editable. You can only act on its content programmatically, and that's it.
2023 Dec 01 5:00 PM
You are correct. We will not be able to input/ change directly. Thanks
2023 Dec 02 7:29 AM
Just to say, again, as it seems that "does a tree control support direct editing by user" was your question, the title "Expand / Collapse (+/-) button on table control" is completely unrelated to the actual question.
Menu Actions > Edit.