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

Tablecontrol total sum

Former Member
0 Likes
376

Dear All

I am using table control 3 fields (Rate, Qty, Amount)

now i want calculate total amount

how will calculate?

Thanks and Regards

Suresh

2 REPLIES 2
Read only

Former Member
0 Likes
354

Hi

Loop at tab.

at end of <<fieldname>>

total = total + <<Amt>>.

at last.

Gtotal = total + gtotal.

endloop.

Reward if helpful.

Regards

Chandralekha

Read only

Former Member
0 Likes
354

Hi

U need to loop the internal table where u store the data to be display in table control in order to calculate the total:

TOT = 0.
LOOP AT ITAB.
  TOT = TOT + ITAB-AMOUNT.
ENDLOOP.

So u should place a new module in PAI after the loop of table control:

PROCESS PAI. 
  LOOP AT ITAB.
  ENDLOOP.
  
  MODULE SUM.

Max