‎2006 Sep 20 9:34 AM
Hi All,
I am new to smartforms. Can anyone tell me about the Calculations node in Table Element. If possible please share me some code samples.
Thanks,
Udaya.
PS: All helpful answers will be rewarded.
‎2006 Sep 20 9:41 AM
Hi,
When executing calculations during table output, you must distinguish between two cases:
<b>1)</b>To calculate values that refer to a single unit or currency, use the Calculations tab of the table node. This node allows you to flexibly integrate the operations Total, Average Value and Number into your table output.
<b>2)</b>To calculate values whose results refer to different units or currencies, you must include program lines nodes in the navigation tree to execute the calculations manually
<b>To use automatic calculations you proceed as follows:</b>
1) Define an additional global field, the target field, which you need to display the result of the operation.
2) On the Calculations tab of the table node select an operation first, then a field (that is, a column of the table), for which to execute the operation, and specify the calculation and initialization events.
3) Depending on whether you execute a calculation on all items of the table or on items of a sort level, display your result either in the footer or at the beginning or end of a sort level.
See the below SAP link for Calculations:-
http://help.sap.com/saphelp_nw04/helpdata/en/cd/c8d11a356111d5b699006094192fe3/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cd/c8d114356111d5b699006094192fe3/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cd/c8d11d356111d5b699006094192fe3/content.htm
<b>Summing Up Different Currencies:-</b>
http://help.sap.com/saphelp_nw04/helpdata/en/35/3f899ab4c111d4b62a006094192fe3/content.htm
Regards
Sudheer
‎2006 Sep 20 9:40 AM
Hi,
The calculation node allows you to do simple operations like Totalling of a field in the table.
For eg if you have a amount field in the table, and you want to sum that field for all the item's in the table then instead of writing a code for it, you can directly use the sum opearation in calculations.
Similarly u can use the operation Average(mean) and numbering in the table.
Regards,
Devendra
‎2006 Sep 20 9:41 AM
Hi,
When executing calculations during table output, you must distinguish between two cases:
<b>1)</b>To calculate values that refer to a single unit or currency, use the Calculations tab of the table node. This node allows you to flexibly integrate the operations Total, Average Value and Number into your table output.
<b>2)</b>To calculate values whose results refer to different units or currencies, you must include program lines nodes in the navigation tree to execute the calculations manually
<b>To use automatic calculations you proceed as follows:</b>
1) Define an additional global field, the target field, which you need to display the result of the operation.
2) On the Calculations tab of the table node select an operation first, then a field (that is, a column of the table), for which to execute the operation, and specify the calculation and initialization events.
3) Depending on whether you execute a calculation on all items of the table or on items of a sort level, display your result either in the footer or at the beginning or end of a sort level.
See the below SAP link for Calculations:-
http://help.sap.com/saphelp_nw04/helpdata/en/cd/c8d11a356111d5b699006094192fe3/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cd/c8d114356111d5b699006094192fe3/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cd/c8d11d356111d5b699006094192fe3/content.htm
<b>Summing Up Different Currencies:-</b>
http://help.sap.com/saphelp_nw04/helpdata/en/35/3f899ab4c111d4b62a006094192fe3/content.htm
Regards
Sudheer