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: 

Problem in Grouping the ALV output

former_member182485
Active Contributor
0 Kudos

Hi Experts

I want to group the ALV Grid output Division wise

for that I have written following code

wa_sort-spos = '1'.

wa_sort-fieldname = 'REGIOAREA' .

wa_sort-tabname = 'IT_FINAL' .

wa_sort-up = 'X'.

wa_sort-group = '*'.

wa_sort-subtot = 'X'.

APPEND wa_sort TO it_sort .

CLEAR wa_sort.

I m passing it_sort table in the FM for sorting but output is not getting grouped can you please

tell me what is the problem ?

How to group the report ?

Helpful answers will be highly rewarded

Regards

Bikas

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

I also have the similar way coded .

DATA: s_sort TYPE slis_sortinfo_alv.

CLEAR s_sort.

s_sort-fieldname = rv_fieldname.

s_sort-spos = rv_spos.

s_sort-up = c_x.

s_sort-group = c_underline.

APPEND s_sort TO rt_sort.

CLEAR s_sort.

I don't have a subtotal for that fiels .

It works for me .

2 REPLIES 2

Former Member
0 Kudos

Hi ,

I also have the similar way coded .

DATA: s_sort TYPE slis_sortinfo_alv.

CLEAR s_sort.

s_sort-fieldname = rv_fieldname.

s_sort-spos = rv_spos.

s_sort-up = c_x.

s_sort-group = c_underline.

APPEND s_sort TO rt_sort.

CLEAR s_sort.

I don't have a subtotal for that fiels .

It works for me .

Former Member
0 Kudos

For the particular field on which you need to group, you need to give

is_Fieldcat-do_sum = 'X' before appending it to the fieldcat internal table.

Try this and then check.