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.
cancel
Showing results for 
Search instead for 
Did you mean: 

Reset Calculations in Smartforms

Former Member
0 Kudos

Hi:

I'm new in smartforms.I want to reset a currency calculation in my smartform when a Buissnes Partner changes. In the calculation tab page set de value "Sort Criterion" in the Reset Field and "PARTNER" in For Field Name, but when I execute my program doesn't reset the value, keeps accumulating amounts. Does anybody have a clue?? Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Could you please elaborate the complete scenario.

I guess you are using table and in that on Data tab you are using sort criteria for partner. Also tick the Begin of control event in the same Tab for the field.

After that you will see event under the table node for partner. Add program lines under the event and write your code to reset the currency calculations there.

regards,

Gagan

3 REPLIES 3

Former Member
0 Kudos

Hi,

Could you please elaborate the complete scenario.

I guess you are using table and in that on Data tab you are using sort criteria for partner. Also tick the Begin of control event in the same Tab for the field.

After that you will see event under the table node for partner. Add program lines under the event and write your code to reset the currency calculations there.

regards,

Gagan

Former Member
0 Kudos

Hi Gagan:

Well, in Data Tab I have tick the sort criteria by BP. Yes,I see the event under the main area of the table. I have insert the row where de total amount is display. The total apears perfectly in the row that must be, but the problem is that in the smartform doesn't reset the amount. The internal table y passed is defined in the formular interface, The work area where I'm reading the amount is in the global definitions. The TOTAL is defined too in GLOBAL DEFINITIONS. In the tab page CALCULATIONS of the table have:

operation= TOTAL

field name = W_DFKKOP-BETRH

target field name = TOTAL

event = AFTER LOOP

initial = tick

reset = SORT CRITERION

for field name = PARTNER.

I hope this help you to get my scenario. Thanks

Former Member
0 Kudos

THANKS GAGAN.....IT WORKS!!!!!