Skip to Content

RE: How to calculate subtotal and total in smartforms when vbeln value changes

Apr 11 at 11:54 AM


avatar image
Former Member

Hi Experts

I am having the following fields in my internal table vbeln, matnr, matkl,zmeng. in my driver program i have used at end of and at last event to calculate subtotal and grandtotal, now how to print the same in smartforms, can u help me in this issue.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Hedvig Rohonyi
Apr 12 at 06:53 AM

Hi Nagaraj,

If you want to calculate a grand total for your table you have two possibilty:

1. You can execute calculations manually using program lines nodes. However, this is necessary only for calculations on values that can have different currencies or measurement units.

2. You can use the Calculations tab of the table node which supports the operations Total, Average Value, and Number on application data.

See online help

and standard Smartform SF_TOTALS as examples for calculate totals. Use application program SF_TOTALS to call this form.

Best regards,


10 |10000 characters needed characters left characters exceeded
Kali Charan Apr 11 at 12:28 PM

I hope with out using at last and at end ,we can calculate the amount.
Sub total means, I hope some of lines items. in driver program you need to sum all the lines item values then pass to the smart form.

In smart form in program lines u can capture Sub total values, here you need to write logic for getting Grand total.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

whenever vbeln value changes i need to calculate subtotal. without at end of how can i do it driver program, can u send the code for that and how can i pass that to smartform that code also.