on 08-08-2007 4:26 AM
hi,
pls help in this problem,
how to calculate cumulative totals for the particular field in samrtforms
many way to do this, easiest way is to create program lines and loop your table.
Ex,
LOOP AT itab.
AT LAST.
SUM.
WRITE SUM TO <VARIABLE>
ENDAT.
ENDLOOP.
You can store the sum inside a variable and display the variable.
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 ,
Either you can calculate the sum in driver program with
Loop at where Condition .
Sum the required field .
endloop .
Then pass it to smartforms
Or
Double Click on table node .
In the conditions tab give the required condition .
select calculation tab.
In operation select Total , in field name give the name of the field you want to sum
and in targer field name specify the name of the field that should contain the result .
To convert the total in to words use the function module in program lines
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
EXPORTING
amt_in_num = w_total
IMPORTING
AMT_IN_WORDS = w_total_words
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
Regards
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai,
If you must be using a TABLE to display the data in the smarform.
In the table definition you have <b>CALCULATION</b> tab. In that you have the <b>Operations</b> column where there is <b>TOTAL</b> operation.
In the Field Value column you give <i><WA_OUTPUT-FIELDNAME></i> & in the target field you give the variable <i><V_TOTAL></i>. Then in the footer of your table you display this variable.
Hope u find this helpful. Do reward some points.
Regards,
Suhas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.