Application Development and Automation 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: 
Read only

contol break event problem

Former Member
0 Likes
421

Hi,

Good day guys

ive dev the smart form for sales. i need to cal the total sales per month as well as Region wise and branch wise.

i dont the total sales per month. now i need to cal the region wise.

so i used the code as below as


sort itab by region.
loop at itab into wa.
at new region.
sum.
append wa to itab2.
clear:wa.
endat
endloop.

iam bit confuse with at new and on chage of.. plz let me know how to cal the region wise.

regards

chandu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
396

Hi..

Consider an internal table of following type

Month Region Person Department

If you use AT NEW Field3, then it is triggered when ever Field3 changes as well as whenever value in its preceding column change.

It considers the columns till Field3 as key, and any change in one of these values triggers AT NEW.

Now using AT NEW Month, will trigger at new whenever Month changes.

However if you use AT NEW person, then it will be triggered even if Month or Region changes, not just Person.

One more thing I would like to mention.

Once you use at new month which works fine and then you try to use at new region, then you should use another internal table having the following structure.

Region Month Person Department

ON CHANGE of gets triggered when ever the mentioned field changes.However this is obsolete now.

Regards,

Karthik

1 REPLY 1
Read only

Former Member
0 Likes
397

Hi..

Consider an internal table of following type

Month Region Person Department

If you use AT NEW Field3, then it is triggered when ever Field3 changes as well as whenever value in its preceding column change.

It considers the columns till Field3 as key, and any change in one of these values triggers AT NEW.

Now using AT NEW Month, will trigger at new whenever Month changes.

However if you use AT NEW person, then it will be triggered even if Month or Region changes, not just Person.

One more thing I would like to mention.

Once you use at new month which works fine and then you try to use at new region, then you should use another internal table having the following structure.

Region Month Person Department

ON CHANGE of gets triggered when ever the mentioned field changes.However this is obsolete now.

Regards,

Karthik