Application Development and Automation 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: 
Read only

Problem in ALV grid grouping table.

Former Member
0 Likes
1,459

Hi all, i'm having a problem using alv grid display. my problem is how to group several columns into one column, so the column will have parent. for example:

-


January

-


Cost

Benefit

Budget

etc

-


I want to group the column like cost, benefit, budget, etc into one parent column which is january. for information i'm using call function reuse_alv_grid_display. Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,352

Julius,

I don't think what you are trying to achieve will be possible using ALV GRID.

You might want to look at ALV TREE so that can have the display like that. Or have a Grid and SORT it month. In the layout the NO_MERGING should not be set so that month data is not repeated.

regards,

Ravi

Note : please mark the helpful answers.

10 REPLIES 10
Read only

Former Member
0 Likes
1,353

Julius,

I don't think what you are trying to achieve will be possible using ALV GRID.

You might want to look at ALV TREE so that can have the display like that. Or have a Grid and SORT it month. In the layout the NO_MERGING should not be set so that month data is not repeated.

regards,

Ravi

Note : please mark the helpful answers.

Read only

Former Member
0 Likes
1,352

Hi,

you need to use <b>REUSE_ALV_HIERSEQ_LIST_DISPLAY</b>

here you can show based on month .

Regards

vijay

Read only

Former Member
0 Likes
1,352

Thank you for your answer, but i need a function to show alv grid, not alv list, is there any way to group the table so that it will based, for example like months, or year.

Read only

0 Likes
1,352

Hi,

in that case you can group them using Sort table parameter. you can build the sort table based on month, and the data will be grouped based on month. this is another possibility.

sort-fieldname = 'MONTH'.

sort-up = 'X'.

append sort to it_sort.

pass this IT_sort to alv grid FM.

Regards

Vjay

Read only

0 Likes
1,352

Have look at the Demoporgrams

BCALV

You need the demo flight model to get some results. There are examples doing exactly what you want.

Read only

0 Likes
1,352

Julius,

In that case, I don't think you have any other option that just sorting the table, like I specified in the first response.

Regards,

Ravi

Read only

0 Likes
1,352

Hi,

Check these program...

<b>

BALVST03_GRID</b>

Regards

Vjay

Read only

Former Member
0 Likes
1,352

Okay, thanks for ur answer.... that's mean that i cannot group the column at the top of alv, instead i have to sort it and group it based on the column it self.

Read only

0 Likes
1,352

Have a look at this: BCALV_TREE_01

Read only

0 Likes
1,352

Yes, you add the month also to the same internal table and sort it based on month , using sort table and pass it to ALV grid FM.

Regards

Vjay