Skip to Content
2
Sep 10, 2023 at 04:11 PM

Hide the value of certain cells in ALV GRID (not talking about whole columns/rows)

174 Views

Hello,

I had this below question and couldn't find a satisfactory answer in the forum.

For your information, I solved it and I will post the solution in 2 minutes, but you are welcome to add any information or solution.

I have this ALV which I display using CL_GUI_ALV_GRID, and I want to hide cell values (hide zeroes) in rows where the "price" column is lower than 650:

image.png

I thought about setting NO_ZERO = 'X' in the field catalog (LVC_S_FCAT) but it works only for a whole column, changing the types of numeric columns to characters in order to fully control the display but it's a bad trick at design level (a number should remain internally a number, it's only while displaying that hiding the value should occur), using colors in these cells or italic (but still displaying the zeroes) as a workaround but I find it very ugly.

Any solution?

Thanks.

Sandra

Attachments

image.png (25.1 kB)
image.png (24.7 kB)