‎2008 Nov 10 9:47 AM
Moderator message: in future, please use a meaningful subject for your questions
Hi experts,
In the internal table i have 6 fields and I am looping it.
inside the loop i am checking
AT END of A.
--statements
ie. for end of fields A i am executing some statement same way I need to exectute or check for field B also that is when ever the field B changes I need to to execute the same set of statements.
I am confusing with logic . can any one clarify this
thanks
sai
Edited by: Matt on Nov 10, 2008 11:57 AM
‎2008 Nov 10 9:54 AM
the order of the fields in the internal table matters as well: if field A is the first field in the internal table and B is the second, than AT END OF B will be a concatenation of A and B. Some example:
A B
1 5
1 5
2 5
2 6
2 6
3 6
3 7
if the values are like above, than AT END OF b will be true in lines 2nd, 3rd, 5th, 6th and 7th (pls. note again the value of A and B are taken together!)
‎2008 Nov 10 9:54 AM
Hi,
after you are done with AT END of A, you can start for B.
AT END OF A....
statements...
ENDAT
AT END OF B...
statements...
ENDAT.
Regards,
Suganya
‎2008 Nov 10 9:55 AM
Hi
Use statement ON CHANGE OF statement
loop at
at new a .
...............
endat.
on change of B.
..........................
endon.
endloop
Regards
Edited by: srinivasu bv on Nov 10, 2008 10:55 AM
‎2008 Nov 10 9:59 AM
Hi,
sort ur itab with A B.
Now go with the control break event AT END OF B.
Sysytem will handle the remaining things,
When ur checking with B,
System first checks on B and then A.
So even if the value of A changes and B reamins unchanged then also at end will trigger.
A B
1 2
2 2
2 3
in the above case it will trigger every time.
Try this
Regards,
Mr.A