Skip to Content
avatar image
Former Member

Sub Total display in Samrtforms

Hi ,

I need to display sub totals in my smartform.Infact I have used Calcualtions Tab Under TABLE with Operation "Total" and Time "After Loop" which is displaying wrong values when Internal Table values are spanned to multiple pages. Can any body help me.

Regards,

Srinivas

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Sep 23, 2008 at 05:36 AM

    Hi srinivasa,

    create the program lines for the subtotal :

    clear w_sum.

    Regards,

    Sravanthi

    Add comment
    10|10000 characters needed characters exceeded

    • >

      > I can not create any text node after Main Window and according to my requirement, I need to display my sub total in footer of my table inside Main Window.

      "..............Main window
      ".......................Table with loop
      "...........................main area with flow logic calculate sum here in some temp variable
      "..................................footer, print here your temp with text node

      No need to create text node after main window

  • avatar image
    Former Member
    Sep 23, 2008 at 05:55 AM

    Hi,

    The subtotal should work properly.If you feel its wrong then you need to check whether you have specified any number of rows under the data tab if you have specified any fixed number of rows.still if you feel you are getting the worng answer, then its better you can write the code manually by creating a program lines through flow logic.

    Regards,

    Varghese

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Varghase,

      I need to do some manual coding itseems since the display is incorrect when internal table' s records spanning to multiple pages. Can you please advice me how to do it?

      Regards,

      Srinivas

  • avatar image
    Former Member
    Sep 23, 2008 at 05:59 AM

    hi,

    what ever you did that one is the page total amount

    in the program lines you write below code.

    input parameters: L_TOTAL_AMT (page total amount)

    output parameters: V_TOT_TOTAL (total amount for multiple pages)

    V_TOT_TOTAL = V_TOT_TOTAL + L_TOTAL_AMT.

    CLEAR: L_TOTAL_AMT.

    total amount in the text node you mentioned like &V_TOT_TOTAL& .

    bhupal.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Bhupal,

      My problem is my code is working if the internal table records doesn't span to multiple pages. If my internal Table's records are more and spanned to multiple records then it is failing to display correct result.

      Regards,

      Srinivas

  • avatar image
    Former Member
    Sep 23, 2008 at 06:22 AM

    Hi srinivasa,

    Declare the variable w_total in the global defintions

    for example:

    w_total type vbrp-netwr.

    In the mainwindow >table>footer--> create the text node for the w_total

    Regards,

    Sravanthi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sravanthi,

      I have tried but invain. I need to display the subtotal inside my footer in the Table control which is in Main Window.

      Regards,

      Srinivas

  • avatar image
    Former Member
    Sep 23, 2008 at 06:39 AM

    Hi srinivasa,

    Subtotal is not possible using tables only grand total is possible.

    In your case create the loop for subtotals.

    Regards,

    Sravanthi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 23, 2008 at 06:51 AM

    Hi Sravanthi,

    My Problem is resolved and Thanks alot.

    Regards,

    Srinivas

    Add comment
    10|10000 characters needed characters exceeded