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: 

Print total

Former Member
0 Kudos

Hi friends,

I am downloading the material, plant, batch, and quantity data into XL sheet. I have created pf-status download and I am calling the function module download and it is downloading properly but I want to print total quantity under the quantity field column at the end of the XL sheet. How to do this? Can I use ‘at last’ please send me sample code.

I wan the output following way in the XL sheet

Material plant batch quantity

500

500

500

500

Total 2000

Thanks to all.

2 REPLIES 2

Former Member
0 Kudos

Hi Bharat

do one thing if u have internal table with data like this.

itab-field1.

500

500

500

now loop at itab.

sum = sum + itab-field1.

endloop.

finally itab-field1 = sum.

append itab.

clear sum, itab.

Reward point for all helpful answers.

kiran.M

Former Member
0 Kudos

HI,

try this,

&----


*& Report YYYVENKATESHTESTING *

*& *

&----


*& *

*& *

&----


REPORT YYYVENKATESHTESTING .

data: begin of itab occurs 0,

a(2) type c,

c type dmbtr,

end of itab.

itab-c = '123.00'.

itab-a = 'A'.

append itab.

itab-c = '123.00'.

itab-a = 'A'.

append itab.

itab-a = 'A'.

itab-c = '123.00'.

append itab.

data: d type dmbtr.

loop at itab.

d = d + itab-c.

endloop.

itab-c = d.

itab-a = 'A'.

append itab.

loop at itab.

write:/ itab-a , itab-c.

endloop.

reward points if helpful,

thanks & regards,

venkatesh.