Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

merge row in ALV

Former Member
0 Kudos

hello everyone, im having a problem woth my ALV, how can i merge rows in ALV,

example i want to merge row 3 and row 4?

Another 1 how can I format a certain row in ALV?

example row 5, I want the displayed value be centered, or right aligned, or left aligned...

thank you very much

4 REPLIES 4

Former Member
0 Kudos

Hi

I am not sure if merging rows is possible. You can merge the rows in internal table before passing it to ALV.

However check this site , it is helpful for ALV.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm

Cheers

Former Member
0 Kudos

Christopher,

I am not sure what is the functionality you are trying to achieve by merging rows. If you SORT the rows, there should be a option (Iam not sure whether it is in the field catalog or the layout most probably in the layout), where the rows with the same for specific columns will automatically get merged. However, it does not make sense if the entire row is duplicated. You probably can delete the adjacent duplicates by sorting the table even before displaying the data.

I am not sure the formatting that you are asking, but you can trying passing different values to LVC_T_STYLE type table which has to be a part of you data internal table. So, for a specific row, you append the column names and the specific style that you want for individual columns.

Regards,

Ravi

Note : Please reward points if this helps you.

0 Kudos

Im trying to display values like this...

-


value1|

value2|

-


is this possible in ALV? so ive plan to merge two rows in ALV to have the same result...

-


value1 |

-


value2 |

-


thanks again...

0 Kudos

Christopher,

If all you want to make sure there are no duplicate rows are being displayed, I suggest to use "DELETE ADJACENT DUPLICATES", so that your internal table that is passed to the grid, does not have duplicate rows at all. So, you don't have to merge the rows.

If your requirement is more than this, please explain the same in detail.

Regards,

Ravi