Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV tree

pranai_pradhan
Explorer
0 Likes
1,472

Hi I have used FM 'RS_TREE_CONSTRUCT' and 'RS_TREE_DISPLAY' for my report.

My requirement is to show an exclamation mark in red as an indicator when a particular condition is not met.

how can I achieve this? please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,431

Hi,

You can just add icon to the name of the node:

lv_enry-name = ''@1B@ Node with error'. " ICON_MESSAGE_ERROR

Hi I have used FM 'RS_TREE_CONSTRUCT' and 'RS_TREE_DISPLAY' for my report.

My requirement is to show an exclamation mark in red as an indicator when a particular condition is not met.

how can I achieve this? please help.

8 REPLIES 8
Read only

Former Member
0 Likes
1,432

Hi,

You can just add icon to the name of the node:

lv_enry-name = ''@1B@ Node with error'. " ICON_MESSAGE_ERROR

Read only

pranai_pradhan
Explorer
0 Likes
1,431

Thanks Alexander.

I tried appending the icon to the name but it isn't working.

Read only

0 Likes
1,431

Hm, I also tried. Can you try to change  NODETAB-NAME in report BCTREEPT in debug mode? I changed it to '@1B@ROOTNODE'.

Here is the result:

Read only

0 Likes
1,431

many thanks alexander. It gives the output.My requirement was like :

Customer no.  Customer name

1                    Alex

! 2                   Emma    

So when there is an exception the indicator must be displayed.

So, I concatenated the icon along with the value and passed the same in the node-text.

It's working!!!.

Read only

0 Likes
1,431

You also can use

NODES-TEXT2 = 'ICON_MESSAGE_ERROR'.
NODES-KIND2 = 'I'.

like in BCTREEPT.

Read only

0 Likes
1,431

Hi,

Can you help me with one more issue.

I see that there is provision of displaying only 10 columns using FM 'RS_TREE*' as in structure snodetext, there are only 10 fields.(e.g. text , text1, .........text9).

I have more than 10 columns to dispaly.

'

Read only

0 Likes
1,431

I think you'd better use CL_GUI_ALV_TREE

Read only

0 Likes
1,431

Yes I did some research,though I am not that strong in OOPS. I believe that we can't display the column headings of every node in a tree. For my requirement, he node structures are different from each other.