首页 > SAP > ABAP > Add cell color in ALV using CL_SALV_TABLE
2019
08-29

Add cell color in ALV using CL_SALV_TABLE

[adsenseyu2]

In this tutorial, we will learn how to color a particular cell in ALV using the factory class CL_SALV_TABLE.In earlier tutorial we have added colors to row in ALV, click here to know how. This is similar to coloring row. Lets see how we can do it.

To apply cell color,

Create a new column of Type LVC_T_SCOL in your output internal table.
Set the above column as Color Column in ALV by using the method SET_COLUMN_COLOR( ).
Add the color data to the color column based on your requirement.

Create a program in SE38-ABAP编辑器 and copy the below code.

https://gist.github.com/prakash13t/7e4f8b9b8d1ba2d6f178#file-cellcolor_salv-abap

1.Output Before:

[adsenseyu1]

2.Output after adding color to cells:Add cell color in ALV using CL_SALV_TABLE - 第2张  | 优通SAP

最后编辑:
作者:yangsen
本站为个人博客网站,全由我个人维护,我从事SAP开发13年,其它ERP开发7年,基本都是零售行业。本站记录工作学习的过程, 有SAP相关询问专、兼职工作可随时联系我。 有网站相关的问题可直接在文章下方留言,或者联系我。 邮件:yan252@163.com给我。 QQ:415402519