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

logic

Former Member
0 Likes
518

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

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
490

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!)

Read only

Former Member
0 Likes
490

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

Read only

Former Member
0 Likes
490

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

Read only

Former Member
0 Likes
490

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