Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to summarize a column values into a field

Hi forum

¿ Do you now how to summarize a column table values into one field?

I don´t understand in what event i can to put the code.

And if you can put some code.

For example.

                     |       h1      |        h2       |      h3    |

                     |       rA1    |        rA2      |      rA3   |
                     |       rB1    |        rB2      |      rB3   |
                     |  rA1 + rB1   |  rA2+ B2       | rA3 + rB3|


Josué Cruz

Edited by: Josue Cruz on Sep 2, 2008 12:41 AM

Edited by: Josue Cruz on Sep 2, 2008 12:42 AM

Former Member


If you have a static table where you know the number of rows and have designed it accordingly in the form then below steps should probably help you.

1. Drag Table control from standard library and select 3 columns and 3 body rows. Select the lnclude Header and Footer Row options and click OK.

2. Select the first cell (Cell1 of Row1) and change its Type to Numeric Field from Object palette. Do this for other cells as well.

3.For cells in footer row, select the calculate event, keep script as Formcalc and enter following code appropriately for the 3 cells.

// Code in cell1 calculate event of footer row.
Sum(Table1.Row1.Cell1, Table1.Row2.Cell1, Table1.Row3.Cell1)

// Code in cell2 calculate event of footer row.
Sum(Table1.Row1.Cell2, Table1.Row2.Cell2, Table1.Row3.Cell2)

// Code in cell3 calculate event of footer row.
Sum(Table1.Row1.Cell3, Table1.Row2.Cell3, Table1.Row3.Cell3)


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question