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

AT END - Control Break

Former Member
0 Likes
832

Hi

I am using an AT End fieldName Statement while looping inside a internal table. The problem that i am facing is this event is fired for every loop pass even though the fieldName is same. I have sorted the internal table by that fieldName. Can anyone say what could have gone wrong.

Murli

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

Hi,

AT event blocks also consider values of the type C field names that are to the left of the field that is specified in the AT block.

So if the value of any of these fields change then it will go into the AT END OF block even if the AT field value remains unchanged.

Hope this helps..

Sri

Hi,

AT event blocks also consider values of the type C field names that are to the left of the field that is specified in the AT block.

So if the value of any of these fields change then it will go into the AT END OF block even if the AT field value remains unchanged.

Hope this helps..

Sri

6 REPLIES 6
Read only

Former Member
0 Likes
817

Hi,

AT event blocks also consider values of the type C field names that are to the left of the field that is specified in the AT block.

So if the value of any of these fields change then it will go into the AT END OF block even if the AT field value remains unchanged.

Hope this helps..

Sri

Read only

Former Member
0 Likes
816

Hi Murli,

The problem could be caused by the order of the fileds in the sturctue ( I'm not sure)... Could you post the code and datadeclaration of the itab. Have you allready debugged the code to check if the field actually is te same? Doyou get ** signs?

Read only

Former Member
0 Likes
816

Hi

Sort the table with the all the character fields upto the specified field starting from left ( in the structure ) .

Control ( At end of ) is triggred if one or more fields

in the struture ( from first field to the specified field ) changes.

Check you data also , maybe each line has a new value

and hence this AT end of is triggered.

Cheers

Read only

0 Likes
816

Hi Ravi,

As Mr. Sanjay said, sort the table upto the field you specified in AT END OF Statement.

If your requirement is to trigger this event only when the value in a particular field is changed, then go for ON CHANGE OF ... statement.

Regards,

Phani

Read only

Former Member
0 Likes
816

Hi Murali,

Debug and check the values that you get in the internal table. It must be going into AT END in each and every loop because the values in your key fields are changing or not populated prior to AT END OF <key field>. Check this up.

Regards,

Thiru

Read only

Former Member
0 Likes
816

Thanks.. It has been fixed. I have rewared points for the same