on 08-01-2007 1:21 PM
Hi All,
Can anyone please help me how to find the page subtotal of any field thats populated in a table in a smartform?
Inside table you will see a tab called calculation use sort of begin and sort of end based on the field and do your calculation.
regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
for sub-totals create int.table and work area of type your required db.table and go through the below steps.
1. mention the field in Sort Criteria (you can find in DATA tab inTABLE)based on which you want subtotal for another field.And check the check-boxes Event on SortBegin,Event on SortEnd.
2.then you will get 2 nodes with name of the field u have given.before and after main area. for ex.NTGEW Event on SortBegin
NTGEW Event on SortEnd
( for example you want subtotal based on the weight-wise i.eNTGEW and you want to add cases delivered i.e.LFIMG)
3.pass the data to subtotal internal table from int.table which contains item data or from datadbase. in main area
4.below the NTGEW Event on SortEnd node create one loop and under the loop create programlines there you have to write coding for subtotal like in reports,
loop at it_sub into wa_sub.
at end of <f>
sum.
endloop.
and then create one TEXT and give the variable for ex. &wa_sub-lfimg&(which contains subtotal value)
5.and dont forget you should refresh the int.table of subtotal below the NTGEW Event on SortBegin node.
for totals simply mention in the calculation tab.
regards,
rajkumar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
for sub-totals create int.table and work area of type your required db.table and go through the below steps.
1. mention the field in <b>Sort Criteria</b> (you can find in DATA tab inTABLE)based on which you want subtotal for another field.And check the check-boxes Event on SortBegin,Event on SortEnd.
2.then you will get 2 nodes with name of the field u have given.before and after main area. for ex.NTGEW Event on SortBegin
NTGEW Event on SortEnd
( for example you want subtotal based on the weight-wise i.eNTGEW and you want to add cases delivered i.e.LFIMG)
3.pass the data to subtotal internal table from int.table which contains item data or from datadbase. in main area
4.below the <b>NTGEW Event on SortEnd</b> node create one <b>loop</b> and under the loop create <b>programlines</b> there you have to write coding for subtotal like in reports,
loop at it_sub into wa_sub.
at end of <f>
sum.
endloop.
and then create one <b>TEXT</b> and give the variable for ex. &wa_sub-lfimg&(which contains subtotal value)
5.and dont forget you should refresh the int.table of subtotal below the <b>NTGEW Event on SortBegin</b> node.
for <b>totals</b> simply mention in the calculation tab.
regards,
rajkumar.
Message was edited by:
rajkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
You can use the <b>PROGRAM LINES</b> node to calculate the page totals in Table node.
Table Node has three sections:
<b>Header: (</b>Triggered once in the beginning of a page)
Create a Program lines node to reset the value of TOTAL to 0.
<b>Main Area</b> (For each row of internal table)
Create a Program lines node to add the Value to TOTAL
<b>Footer</b> (Triggered once in the End of a page)
Display the TOTAL
Note: 1) You can declare the TOTAL variable in the GLOBAL Definitions under GLOBAL DATA.
2) In the PROGRAM lines always pass the TOTAL in both INPUT and OUTPUT parameters
This will work..
<b>Reward if Helpful</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.