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

Loop statement

Former Member
0 Likes
894

Hi,

I did extended program check, i receive the following error two times

<b>The LOOP statement processing will be limited

(FROM, TO and WHERE additions in LOOP)

Interaction with group change processing (AT NEW, ...) is undefined

(The message can be hidden with "#EC *)</b>

In my loop I used 'at new' and 'at end of' statements

How to correct this?

Thank you,

Surya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
828

Hi,

I assume that you are using following code

LOOP AT <ITAB> WHERE <CONDITION>

AT NEW.

-code---

ENDAT.

ENDLOOP.

my friend...you cannot use AT NEW command inside LOOP AT <ITAB> WHERE <CONDITION>. The Loop is limited only to the condition. The system may not throw a syntax error. But technically speaking AT NEW will not work.

Click the following link to know more about Control Break Statements.

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb381a358411d1829f0000e829fbfe/content.htm

Regards,

Vara

Message was edited by:

varaprasad bhagavatula

6 REPLIES 6
Read only

Former Member
0 Likes
828

plz, can you insert loop code?

it's more simple to us help you.

thanks

Read only

Former Member
0 Likes
828

Hi Surya,

error seems u r using other conditions which loop statement doesn't have.... and check that if u ended the loop statement with period ( . ).

If u paste the code where u get the error then it might be useful for us to correct u... without checking code its hard to assume ur error.

Regards

CNU

Read only

Former Member
0 Likes
829

Hi,

I assume that you are using following code

LOOP AT <ITAB> WHERE <CONDITION>

AT NEW.

-code---

ENDAT.

ENDLOOP.

my friend...you cannot use AT NEW command inside LOOP AT <ITAB> WHERE <CONDITION>. The Loop is limited only to the condition. The system may not throw a syntax error. But technically speaking AT NEW will not work.

Click the following link to know more about Control Break Statements.

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb381a358411d1829f0000e829fbfe/content.htm

Regards,

Vara

Message was edited by:

varaprasad bhagavatula

Read only

Former Member
0 Likes
828

Hi Surya,

Seems you have wirtten the WHERE condition in LOOP AT Statement, so do not do that one to avoid this and in teh Control break statments, use all the statemets

Regards

Sudheer

Read only

Former Member
0 Likes
828

I think it means that because you are using LOOP AT itab WHERE..., the WHERE may interfere with AT NEW.

Rob

Read only

Former Member
0 Likes
828

loop at itab <b>where</b>...this one comes first and it bypasses control statements.