cancel
Showing results for 
Search instead for 
Did you mean: 

carry forward amount into next pages

Former Member
0 Kudos

carry forward amount into next pages in scripts and also i want to print all pages total in the last page .

example i have 5 pages in 5th page means last page i am only displaying company address and text in 4th page last i have to display 4 pages totals .

First page i have to display first page line items totals in the last.

Second page top i have to display first page totals and second page line items and its totals in the last.

3rd page same as above second page.

4th page i have to display top 3rd page totals and end of the page i have to display 4 pages totals.

5th page company information.

please suggest me logic.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Subba rao,

Refer this [Wiki|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/displayingspecificnumberofrecordsperpage.] for your requirement

Regards,

Sravanthi

Former Member
0 Kudos

Hi!

in your main window define the carry forward and totals as....

(this below statement should be written at the top before ant data elements....)

/: SUMMING &FS_FLIGHT-PRICE& INTO &W_SUM&

NOW UNDER A DATA ELEMENT LIKE

/E CARRY

/: IF &PAGE& NE 1.

  • CARRY FORWARD AMOUNT : &W_SUM&

/: ENDIF.

/E GRAND_TOTAL

GRAND TOTAL : &W_SUM&

after you have done this ....

in the driver program call THE WRITE FORM in this way in open form and close form.......

form main_window .

loop at t_flight into fs_flight.

call function 'WRITE_FORM'

exporting

element = 'CARRY'

window = 'MAIN'

exceptions

element = 1

function = 2

type = 3

unopened = 4

unstarted = 5

window = 6

bad_pageformat_for_print = 7

spool_error = 8

codepage = 9

others = 10.

  • This statement is used to display the grand total for the last page

at last.

call function 'WRITE_FORM'

exporting

element = 'GRAND_TOTAL'

window = 'MAIN'

exceptions

element = 1

function = 2

type = 3

unopened = 4

unstarted = 5

window = 6

bad_pageformat_for_print = 7

spool_error = 8

codepage = 9

others = 10.

exit.

endat.

ENDLOOP.

Former Member
0 Kudos

I am using standard form here i am not creating any elements i am using subroutine for calling the sub totals and total values .

how can i display total values dynamically please suggest me.

Former Member
0 Kudos

Hi,

Append all the Page Totals to an Internal table, and when u form reaches last but page just print them by LOOPing that Internal table.

Hope it helps!!

Rgds,

Pavan

Former Member
0 Kudos

Use 2 Different variables,1 for each page total e.g X & other for grand total to be displayed on last page e.g. Y.

Use Variable 'X' to hold total for each page & refresh it at new page.

Regards,

Yogendra.