Skip to Content
avatar image
Former Member

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

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.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 12, 2018 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,


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 11, 2018 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.

    Add comment
    10|10000 characters needed 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.