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

ALV using class--sub and granttotal

Former Member
0 Likes
348

i hve to get output like this...

year period qty

-


2000 10 | 1

| 2

| 3

| 6 (subtotal)

-


2000 10 | 1

| 2

| 3

| 6

12 (granttotal)

plz tell me how can i dispaly it in ALV grid.

im using oo concept

i hve to get output like this...

year period qty

-


2000 10 | 1

| 2

| 3

| 6 (subtotal)

-


2000 10 | 1

| 2

| 3

| 6

12 (granttotal)

plz tell me how can i dispaly it in ALV grid.

im using oo concept

1 REPLY 1
Read only

Former Member
0 Likes
322

Hi,

When calling the method SET_TABLE_FOR_FIRST_DISPLAY pass the parameter IT_SORT.

The table should contain an entry for the year fieldname, with the field UP set for ascending. A second entry for the period, with the UP field set again and the field SUBTOT set to output a subtotal at the end of each period.

The grand total can be controlled via the field catalog, set field DO_SUM for the relevant quantity column.

Cheers,

Darren