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

regarding calculation tab in smartforms....

Former Member
0 Kudos

hi experts,

i m using calculation tab in the smartforms for calculating total quantity for each material individually,means for first mat. it will calculate likewise for second third etc....

i m giving like this::

operand - total,

field name -wa_itab_final_sfm-labst_tm

target field name - v_labst1

time - after sorting

for field name - MATNR

reset - for sort criteria

for field name - MATNR

but it is not working it is giving total at the end of all material,what sud i add explicitly to achieve the above scenario....


Active Contributor
0 Kudos

Hi. Ravi..

In the TABLE node before the CALCULATIONS TAB you Have DATA tab.

Set the Following in that tab. under SORT Criteria...



then It will work...

<b>Reward if Helpful</b>

0 Kudos

HI narayan,

i have already done what u told now still it is not giving proper output.

Former Member
0 Kudos

instead of giving calculation to all .....keep a programline before u r code .....write control break statement like 'at new matnr' .....and at end.....write sum ...pick this sum in variable....................................

i hpe this would be helpful....

reward points if helpful...

0 Kudos

hi raam ,

see i clicked 'event on sort end' in this i m using text , here i will add the program lines said by you or somewhere else...

Former Member
0 Kudos

after u data retrival logic u need to use this programline.....i mean before u r final internal table [ final internal table node].....

reward points helpful....

0 Kudos

hi raam,

whenever i use at new matnr it is giving error,at new is possible only under loop endloop....

Former Member
0 Kudos

iam sorry ravi in u r loop ......i.e in u r data retyrival logic itself u need to use u r control break this it will definetly work...

i came across this scenario......i triggered sum for every kunnr .

reward points if helpful.....

0 Kudos

Have you tried changing the Time column to 'After loop' instead of 'after sorting'?



<i>Don't forget points for those that help you</i>

0 Kudos

ya nick i also tried this but i didnt get rt result,now i m very much fedup using this so i added program lines now it is working.........

this is the solution:

program lines in the main area :


program lines in the event.

clear v_labst1.