Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Help needed on Smartforms- Table -Calculations Node

Former Member
0 Likes
703

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
411

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

2 REPLIES 2
Read only

Former Member
0 Likes
411

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

Read only

Former Member
0 Likes
412

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