cancel
Showing results for 
Search instead for 
Did you mean: 

Possibility to highlight few rows of a Tree GUIBB based on a condition

former_member213217
Participant
0 Kudos

Hi Experts,

We have a requirement wherein we have a Tree GUIBB with a Search GUIBB above it. The Tree shows list of various commodity codes & the user can use the Search UIBB to enter a commodity code and get to see in the Tree only the particular branch wherein the commodity appears within the hierarchy.

Say user now uses the Search GUIBB to search for a particular commodity code we only display the particular branch wherein it exists within the hierarchy:

Now instead of this design the requirement has changed to exhibit a different behaviour for the Search. The Tree should always display the entire hierarchy and the entries wherein the search criteria exists within the Tree should get highlighted for the user. They expect something like colouring the rows in a plain WDA/ALV output.

Please note that we don't want to enable "multiple selection" for the Selection Mode property of the Tree & set the rows corresponding to the search result as selected as this would lead to inconsistencies for other scenarios. (User selects a row of the Tree and clicks on the Up/Down/Delete buttons to manipulate the Tree. Enabling multiple row selection would lead to further complexities in these scenarios.) I have been trying to find any interface for achieving this behaviour but haven't been successful. Any inputs would be greatly appreciated.

Regards,

Uday

Accepted Solutions (1)

Accepted Solutions (1)

former_member215610
Active Participant
0 Kudos

Hi Uday,

You can highlight each row do color follow below steps.

1. Append one more field into the structure i.e in get_defination method of type WDUI_TEXT_VIEW_DESIGN.

2. Fill cell_design_ref = your WDUI_TEXT_VIEW_DESIGN field name i.e

    if your WDUI_TEXT_VIEW_DESIGN field name is COLOR.

then add remaining field cell_design_ref = 'COLOR'.

ex code:

LOOP AT et_field_description ASSIGNING <fs_tree_descr>.

    <fs_tree_descr>-cell_design_ref = 'COLOR'.

  ENDLOOP.

3. Now at run time change the value of field COLOR.

   loop the ct_data and set value '07' or use some other value to highlighting row.

Regards,

Ragavendra

former_member213217
Participant
0 Kudos

Hi Raghavendra,

Thanks a lot. That was exactly what we were trying to accomplish.

Regards,

Uday

Answers (0)