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 cell in ALV column

Former Member
0 Kudos

hi, everyone

I have a question, hope your quick support. I try to descript it in following:

I have a ALV, and I need to merge the cells in one column, which the value in this column is same.

I think there is a field named NO_MERGING, if I don't set it as 'X', then I can achieve what I want.

But it looks not correct, NO_MERGING is null, but when I sort the column, the same value cell don't merge.

Does anyone has some suggestion? or who know the reason for my problem, wait for your response.

thanks a lot

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

See this sample program BCALV_TEST_MERGE. This may answer your question.

Regards,

Kasthuri Rangan Srinivasan.

7 REPLIES 7

athavanraja
Active Contributor
0 Kudos

once the ALV grid is rendered, go to change layout->display->withou cell merging during sorts (uncheck this check box)

Regards

Raja

Former Member
0 Kudos

Hi,

In your field catalog

set

NO_MERGING = ''. its two single quote.

for those field you want to merge cells with similar values.thats it.

or

NO_MERGING = 'X'.

if dont want to merge.

reward points if it solves yor problem

Message was edited by: Anid

Former Member
0 Kudos

Thank you for your reply.

Raja, I think the layout setting in display menu is equivalent to the IS_LAYOUT.

But my problem is, in my ALV, even the all the checkboxs in that screen have been cleared, the cell still can't be merge.

I have no idea on it.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

To disable cell merging,I hope no_merging = 'X',otherwise you need to give no_merging = ''.

While calling set_table_for_first_display,in debugging just chk your layout-no_merging property.

If it is not reflected,just try changing in debugging and observe why that is happening.

Former Member
0 Kudos

Hi,

See this sample program BCALV_TEST_MERGE. This may answer your question.

Regards,

Kasthuri Rangan Srinivasan.

Former Member
0 Kudos

Actually, I find a phenomena, that if there exist some fields are editable, then the cell can't be merged.

Only when all the fields can be edit, then the same value cell will be merged after sort on associated column.

I don't know if I can do more than this, but this is the rule I find out.

thanks a lot for your reply.

Former Member
0 Kudos

Props to zhenglin gu - my Merging wasn't working until I took out my redundant "CALL METHOD r_grid->set_ready_for_input"

Thanks! I guess the two aren't compatible, which is fine for my case, but if I find a way to make the two go together I'll post back.