2013 Feb 16 11:10 AM
Hello All ,
I have an issue with smartforms Subtotal.
I had browsed through SDN many with this particular case but I was not able to get the solution.
I had done the required in Calculations tab of Tables in Main Window as shown below ,
Now this thing is working fine for first page , but for second page and later pages it is not calculating properly.
Suppose there are 7 lines in each page then for second and later pages the first line item it is considering is of that of first page and this thing is making subtotal amount wrong for second and all later pages.
There are many thread related to this issue but majority threads are open and I am not able to figure out the solution.
I would be very grateful for helpful suggestions regarding this issue.
First Page ( this is fine )
Second Page ( this is faulty )
Thanks ,
Vipul.
2013 Feb 16 11:30 AM
Hello Vipul,
Instead of doing it in calculation tab (as described in your picture) what you can do is take another window for subtotal and inside the window perform your calculation in a program lines.
Take two variables of total and subtotal in Global definition .
Inside program lines write like below:
V_total = Your value.
v_subtotal = v_subtotal + V_total.
Then display this subtotal in a text element.
Thanks,
Abhijit
Hello Vipul,
In footer you can also create a program line inside the table lines. Even another window after the table which i have stated is also possible to show your desire output.
Your second question .. It's difficult to say from here.
Thanks,
Abhijit
2013 Feb 16 11:30 AM
Hello Vipul,
Instead of doing it in calculation tab (as described in your picture) what you can do is take another window for subtotal and inside the window perform your calculation in a program lines.
Take two variables of total and subtotal in Global definition .
Inside program lines write like below:
V_total = Your value.
v_subtotal = v_subtotal + V_total.
Then display this subtotal in a text element.
Thanks,
Abhijit
2013 Feb 16 11:37 AM
Hello Abhijit ,
Very thanks for your prompt reply.
Actually I want this thing in footer part of TABLE . So how can I achieve this thing with your solution.
And one more thing ,
Why system is behaving in such a strange manner i.e it is calculating perfectly for first page but for second page its considering the first line item of first page as first line item of second one.
2013 Feb 16 5:58 PM
Hello Vipul,
In footer you can also create a program line inside the table lines. Even another window after the table which i have stated is also possible to show your desire output.
Your second question .. It's difficult to say from here.
Thanks,
Abhijit
2013 Feb 18 5:22 AM
Hello Abhijit ,
I did the coding using logic on sy-tabix ( Each page consists of 7 lines ). And I appended subtotals in an Internal table.
But I want a more Logical solution to this , the above solution is making the code more complex .
And I didn't get solution to my below problem :
Why system is behaving in such a strange manner i.e it is calculating perfectly for first page but for second page its considering the first line item of first page as first line item of second one.
For that reason only I am keeping this thread open.
2013 Feb 18 8:35 AM
Hello,
Frankly, I've never done the way your doing the calculation so, it's very hard to say. Anyway just one request could you please check by any chance in the condition tab "Only on First Page" is checked?
Have you created the next page same as first page ?
Thanks,
Abhijit
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |