Skip to Content
avatar image
Former Member

totals in each page for corresponding amounts

Hi,

i have some line items and amounts in one form.How to add that amounts in each page for corresponding amounts.

that means in one page calculate totals for amounts which are belongs to that page only.and agin in the secong page some amounts are there in line items.again i have sum those amounts in that page and print it at the end of the page.same should be repeat.and in which window that total calculations should be done??

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Nov 14, 2006 at 05:25 AM

    in main window it self u need to write the code...take variable & add values...At end of page display the total and clear the value...similarly do for all pages...

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 14, 2006 at 05:25 AM

    Hi,

    Check these

    http://help.sap.com/saphelp_40b/helpdata/en/d1/8035c3454211d189710000e8322d00/content.htm

    http://membres.lycos.fr/jolyeric/SAP/Note_de_Cours_Ben/Sapscript/SAPscript_Control_Commands.doc

    try to use the command 'summing' along with one text symbol .Keep the if condtion when page changes at that time u dispay the total as ur keeping the total in text symbol it can be dispayed in the next page

    or this is round about way

    loop at <table>.

    call write_form.

    endloop.

    here u declare a variable 'c' and increment it by 1 in each loop. Then u chgeck if the program has started printing second page then u can print the number of records before printing the next page.

    eg :

    data : c type c value '0'.

    loop at <table>.

    c = c + 1.

    call write_form.

    endloop.

    in form:

    check when the next page is being printed, then u can print the number

    of lines 'c'.

    Feel free to revert back.

    --ragu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 14, 2006 at 06:35 AM

    Can you explain me in clear in every pae i need totals for corresponding amonuts.

    in which window i can display this totals.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi,

      use one footer window ,u use that element in that window ,it will compute the each page amt and prevous page amt also.

      for this that element should be computed in the print program that u have to use in the footer window .

      its help for u.

      bye

      rams