cancel
Showing results for 
Search instead for 
Did you mean: 

SUBTOTAL IN ALV REPORT

Former Member
0 Kudos

hi guru,

my alv o/p 4 fields there, 1/order no 2/yield conformation 3/description 4 / material.

no. 2 field yield conformation field is GMNGA.

here total i got by the help of using do_sum parameter and i got also.

but my client wants ..one subtotal for all onspec mat.

and another subtotal for all offspec mat.

then grand total how to this in alv???how to sort according to the rwquirement???

thanks

subhasis

Accepted Solutions (0)

Answers (3)

Answers (3)

Ashutosht09
Participant
0 Kudos

Is there any identifier in the row to distinguish between onspec and offspec materials? if yes then arrange the records by that identifier

If there is no such identifier then create a entry in the ALV output which will act as one.

The sub total operation can then be done by the standard ALV functionalities by the user after arranging the records based on the identifier field. This should be acceptable to client because it requires just a click of mouse and none of the other features of ALV are affected.

Former Member
0 Kudos

Hi,

You have t pass the parameter for it_sort in ALV fn module.

Just look at follwoing logic for filling it_sort internal table.

w_sort-fieldname = 'COUNTRY'.

w_sort-spos = '1'.

w_sort-up = 'X'.

w_sort-subtot = 'X'.

APPEND w_sort TO t_sort.

CLEAR w_sort.

w_sort-fieldname = 'GRANT_NBR'.

w_sort-spos = '2'.

w_sort-up = 'X'.

w_sort-subtot = 'X'.

APPEND w_sort TO t_sort.

CLEAR w_sort.

w_sort-fieldname = 'PARTNER'.

w_sort-spos = '3'.

w_sort-up = 'X'.

w_sort-subtot = 'X'.

APPEND w_sort TO t_sort.

CLEAR w_sort.

Here you have to pass your fields.

Rewards points if helpful.

Regards,

CS.

Former Member
0 Kudos

hai Subhasis Sahoo,

[FOR SUB TOTALS IN ALV|http://saptechnical.com/Tutorials/ALV/Subtotals/Define.htm]

Regards.

Eshwar.