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: 

ALV List Display - Is it possible to sum up the subtotal values of field

Former Member
0 Kudos

Hi Experts,

We hav a requirement to do subtotals of the price field for each unique PO Line item, and also to sum up the subtotal values ie. only the subtotal values needs to be added irrespective of the repetation of the po line items in the report.

PO Number PO Item Price

XXXXXXXX 10 20

XXXXXXXX 10 20

Subtotalled 20

YYYYYYY 10 10

YYYYYYY 10 10

Subtotal showing 10

We want the total of price to be 30 ie (Subtotal value of XXXX, 10 = 20 and YYYYY,10 = 10 ) but currently do_sum is been used in the fieldcat of the report which displays all the occurances of the record... = 60(202010+10)

Kindly help asap.

Thanks,

Rosy

5 REPLIES 5

Former Member
0 Kudos

Hi Rosy,

I dont think this is acheivable without writing your own code for subotalling anf totalling.

regards,

nilesh.

Former Member
0 Kudos

Hello,

Use Control Break Statemens in your code.

Then only it is possible to make Subtotals & Totals.

Anil.

Former Member
0 Kudos

This message was moderated.

kesavadas_thekkillath
Active Contributor
0 Kudos

This message was moderated.

Clemenss
Active Contributor
0 Kudos

Hi rosy,

the question pops up to why you have duplicates in the display table. If you

DELETE ADJACENT DUPLICATES FROM

the output table, everything should be fine.

Regards,

Clemens