Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member188685
Active Contributor

The Blog explains How to color a cell Conditionally in an ALV Grid control report.

This Blog explains how to apply color conditionally to a cell in an ALV Report using CL_GUI_ALV_GRID class. I developed a small report

Here is the Simple Report with the Steps.


1.Data Declarations part.In Data declaration part include the extra field of type lvc_t_scol which is a deep structure. It is used to assign the colors dynamically.


2.Populate the Internal table and modify the color field conditionally, In this example i am checking the condition seats occupied < 0 then assigin the Red color to the cell


3.Create the Screen 100, and place the Custom Control in the Screen and Name it as FLIGHT.

4.Using the PBO Module set the PF-status and Title Bar. Initialize the Grid , Assign the color field declared in step#1 to ctab_fname of layout before calling the set_table_for_first_display.

5. Call the screen in END-OF-SELECTION to Display the data

6.Check the sample output of the Report.
 

7.The complete coding
1 Comment