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

Add row color in ALV using CL_SALV_TABLE

[adsenseyu2]

In this tutorial, we will learn how to add color to the row of an ALV using CL_SALV_TABLE.In our earlier we applied colors to the columns,click here to know how. This is similar to Functional Module ALV, we need an extra column in the output internal table to apply colors to a particular row (or) particular cell. Lets see how we can do it.

To apply colors to row in ALV

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/3dd7da4db24eca246d74#file-rowcolor_salv-abap

Output before:

[adsenseyu1]

Output after adding colors to row:

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