cancel
Showing results for 
Search instead for 
Did you mean: 

Legend in ALV Table

former_member189058
Active Contributor
0 Kudos

Hi all,

Can we have a legend in ALV table.

Basically I have different colors in different rows depending on some conidtions in the data.

I have to show a legend giving meanings of which color stands for what condirion.

Regards,

Reema

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Have you considered using a Legend UI element?

Seems like it should meet your needs.

http://help.sap.com/saphelp_nw70/helpdata/EN/43/276b69177d601fe10000000a422035/frameset.htm

former_member189058
Active Contributor
0 Kudos

Thanks for your reply Thomas!!

I have a view containing only the view container.

How can I associate the legend ID with the ALV table.

Moreover, after creating a legend, how to create legend items?

Reema.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Here is a quick demo I built:

http://www.flickr.com/photos/tjung/2922995882/

>How can I associate the legend ID with the ALV table.

I actually didn't do any association. I just placed a standalone Legend with the View.

http://www.flickr.com/photos/tjung/2923003826/

>Moreover, after creating a legend, how to create legend items

Just right mouse click on the legend and choose Insert Item. You can insert single LegendItems at design time and set their color, Icon, and text. Or you can insert a MultipleLegendItem which gets bound to a context node for more dynamic legend items.

http://www.flickr.com/photos/tjung/2922151867/

former_member189058
Active Contributor
0 Kudos

Hi Thomas,

Thanks for your efforts. I had tried the same but when I rt click the legend UI, there is no insert element or inser legend item available.

All I have is: Up, Down, Copy, Remove ...

I am on SP level 12

Reema.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

As you can see from my screen shots that obviously isn't the case in more recent support packages. I can't say exactly when that might have changed. The online help also lists entries for the LegendItem and MultipleLegendItem:

http://help.sap.com/saphelp_nw70/helpdata/EN/43/27dbccdb036025e10000000a422035/frameset.htm

http://help.sap.com/saphelp_nw70/helpdata/EN/43/27dc33db036025e10000000a422035/frameset.htm