Skip to Content
0
5 days ago

Blanking duplicated output in ALV

53 Views Last edit 5 days ago 5 rev

Hello experts,

I'm trying to blanking(hide) the duplicates in the ALV report.

image.png

As you can see, the first two fields have blanks for duplicated values.

From the 3rd column to the last column, I'd like to make a blank just like in the previous two fields.

Two conditions:

1. I don't want to remove duplicated rows, so deleting adjacent function is not needed.

2. I want to blank duplicates based on the first two fields.

In other words, even though the value '88432MU012' in the 3rd column is duplicated, I don't want to blank all of them. Instead, I want to blank the values based on the Item Number.

Plus, in the code, I used the below one where I used the GT_SORT[] for blanking the first two columns.

CALL METHOD R_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
* I_STRUCTURE_NAME =
* IS_VARIANT =
* I_SAVE =
* I_DEFAULT = 'X'
IS_LAYOUT = GS_LAYOUT
IT_TOOLBAR_EXCLUDING = GT_TOOLBAR_EXCLUDING
* IS_VARIANT = GS_VARIANT
CHANGING
IT_OUTTAB = GT_ALV[]
IT_FIELDCATALOG = GT_FIELDCAT[]
IT_SORT = GT_SORT[].
* IT_FILTER =

But, if I sort after 3rd column, every duplicates got removed, not based on the second field.

For the output,

image.png

should look like this and hope this makes sense.

Thanks in advance!

Attachments

image.png (49.3 kB)
image.png (25.6 kB)