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: 

Without control break statements needed totals and subtotals

Former Member
0 Kudos

Hi all,

I had an requirement that not to use control break statements and alv i need to print totals and subtotals for a particular customer.Please suggest me how to handle this situation.

Thanks & Regards,

vijay

5 REPLIES 5

athavanraja
Active Contributor
0 Kudos

check out the following link for how this can be done in ALV

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf

Regards

Raja

Former Member
0 Kudos

Hi,

I was not supposed to use alv. So please sugest some other things.for calculating toals and subtotals without control break statements.

Thanks & Regards,

vijay.

0 Kudos

Use COLLECT statement inside LOOP...ENDLOOP

0 Kudos

you wanted to do this on an ABAP list without using control break statements right?

then you have to manually do the calculation using variables.

Regards

Raja

Former Member
0 Kudos

Hi Vijay,

May be this is possible by NESTED loops.

For Ex,

Move all the data in the internal table T_Emp_details to another t_Emp.

Delete t_Emp comparing empid.

loop t_emp.

clear subtot.

loop t_emp_details where empid = t_emp-empid.

.....

.....

.....

subtot = subtot + <required field>

.....

.....

endloop.

tot = tot + subtot.

write: subtot.

endloop.

write: tot.