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

Display total in sapscript

Former Member
0 Likes
717

Hi all,

How will i display total in sapscript. if i get 1 or more pages,the total is getting displayed in the first page itself.

Hi all,

How will i display total in sapscript. if i get 1 or more pages,the total is getting displayed in the first page itself.

4 REPLIES 4
Read only

Former Member
0 Likes
590

hai Sinthu,

1. write the total

in a text element (separate from item element)

2. Then in your driver program,

after printing all the items (using text elements)

one by one,

after the loop is over,

write code to print the text element for TOTALS.

If it doesnt work,use write_form.

Check this link out...

Regards,

Srikanth.

Read only

Former Member
0 Likes
590

Hi

You want to display the total in the first page or the next page.

In which scenario you want to display the total.If it the value of some items than you can calculate them and can display them.

Thanks

Mrutyunjaya Tripathy

Read only

Former Member
0 Likes
590

Hi Sinthu,

Check if u have mentioned next page correctly.

While looping through the internal table.

eg.


              Loop at itab.
                 ....WRITE_FORM
              AT LAST.
                 SUM. 
                 CALL FUNCTION 'WRITE_FORM'
                EXPORTING
                    element  = 'SUM' " A new text element
                    window   = 'MAIN'.
              ENDAT.
              ENDLOOP.
      

Read only

Former Member
0 Likes
590

Hi Sinthu,

at the end of the main Window ..

create

/E TOTAL

/: &total&

calculate this total in the driver program like this..

loop at itab.
 ....
 at last.
 sum.
 total = itab-<f>.
 CALL FUNCTION 'WRITE_FORM'.
 EXPORTING 
  window = 'MAIN'
  elements = 'TOTAL'
 .
 endat.
endloop.

this total is displyed only once that too at the end..

regards

satesh