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: 

Smartform Printing line items

Former Member
0 Kudos

Hi,

I am printing line items in smartform, at the end it should display no of items & total amount how to do so. Please give steps in detail.

Item Currency Amount

1 Inr 10

2 Inr 50

Total 3 60

LIke this, Points Assured

8 REPLIES 8

naimesh_patel
Active Contributor
0 Kudos

Put the code in the MAIN section of the MAIN window to calculate the no of items and Total Amount.

l_tot_no = l_tot_no + 1.
l_amount = l_amount + ITAB-AMOUNT.

Print these both variables in the FOOTER section of the MAIN window.

Regards,

Naimesh Patel

0 Kudos

Please tell where exact i ve to put code explain in detail

Help encouraged

Thanks

Message was edited by:

Rahul

0 Kudos

You can put the code as suggested.

FIRST PAGE
  > MAIN WINDOW
    > TABLE
       > HEADER
       > MAIN
         > CODE TO CALCULATE  " << place to code for total
         > TEXT TO DISPALY THE LINE ITME
       > FOOTER
         > TEXT TO DISPLAY THE TOTAL

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi,

the item will work but the sum of items should be displayed in footer i want to do all the sum of totals in line items & display in footer.

how to do so.

Thanks in advance.

Former Member
0 Kudos

Hi,

the item will work but the sum of items should be displayed in footer i want to do all the sum of totals in line items & display in footer.

how to do so.

Thanks in advance.

0 Kudos

calculate the total in the smartform loop where you are printing the itab values..

and print this total in the footer...

0 Kudos

How to do so

Former Member
0 Kudos

Hi Rahul,

You can code in smartform itself using program lines inside th loop.

Regards,

Sreeja.