cancel
Showing results for 
Search instead for 
Did you mean: 

Page wise Subtotal

Former Member
0 Kudos

Hi Friends,

I have one issue in smartform. I want page wise subtotal in the footer of every page. like 1st page subtotal value in 1st page itself 2nd page subtotal in 2nd page wise. is it possible if yes then how?

Thanks & Regards,

Vimarsh B.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

Can I get whole logic or screen shot to solve this issue, its important.

Thanks & Regards,

Vimarsh B.

Edited by: vimarshbhardwaj on Aug 26, 2009 8:02 AM

Former Member
0 Kudos

HI,

In the form interface... declare two variables... one for total and other for subtotal.

in the table node-> calculation tab - > give both the variables for calculating the total i mean two rows one with subtotal variable and the other with total variable.

In the footer node of the table node... insert the text node to display the subtotal value.

Just below the text node... create program lines node and write the statement

Clear subtotal. (dont forget to pass the variable in parameters )

table node

header

body

footer

line type

cell

text -> display the subtotal value

program code -> to clear the value of subtotal

See that your program code line is below the text node.

Regards

padma

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks Padma,

thanks for your support.

Vimarsh B.

Former Member
0 Kudos

HI,

in footer node select total at page break , put a flag when it goes for second page then clear the total value when the flag sets.

Regards,

Rajkumar.

Former Member
0 Kudos

Hi Padma,

I am doing the same but subtotal values are carry forwarding to next page, i don't want 1st page value carry forward to 2nd page. sum of all value of 1st page has to come on 1st page and sum of all values of 2nd page has to come on 2nd page. but this time in 2nd page i am getting sum of 1st page value + sum of 2nd page value. please help me in this regard to get page wise value not carry forward value.

Thanks & Regards,

Vimarsh B.

Former Member
0 Kudos

Hi

[Subtotals|http://help.sap.com/saphelp_nw70/helpdata/en/55/610e2ab57911d4b62c006094192fe3/frameset.htm]

Regards,

Sravanthi

Former Member
0 Kudos

Hi Padma,

in first page i got 50 line item and writting variable var1 = total of all line items. and what should i do in 2nd page because in one loop i am getting whole value not different loops. what should i write like sypage or somthing or any other command to get value. please suggest me.

Former Member
0 Kudos

hi

Check out this link

https://wiki.sdn.sap.com/wiki/display/ABAP/Togetsubtotalsoneachpagein+smartforms

https://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALINSAP+SMARTFORMS

http://help.sap.com/saphelp_nw04/helpdata/en/55/610e2ab57911d4b62c006094192fe3/frameset.htm

surya

Edited by: suryareddy on Aug 25, 2009 11:22 AM

Edited by: suryareddy on Aug 25, 2009 11:25 AM

Former Member
0 Kudos

In the main area section of the table in main window ...add program lines which will do the total on the requiste field . in the footer section display this total by adding ur line type for footer also add program line to clear the varialble you were using to add in the main area section of the table.

Former Member
0 Kudos

HI

No other conditions are required... just do the following...

table node -> calculations tab -> give the variable name -> field details which has to be summed

In the footer of the table node... display the subtotal value in the text node of the cell.

Just after display of the subtotal value... create program lines node and in that clear the value of subtotal...(make sure your program lines is under the textnode which is displaying the value)

this would serve your purpose.

regards

padma

Former Member
0 Kudos

Hi,

It is very much possible... just simple logic..

declare variable for calculating total... Calculate total and after displaying the value clear the value...that should solve your purpose

If you are trying to calculate both total and subtotal.. then declare two different variables

regards

Padma