Application Development 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: 

Loop statement

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

plz, can you insert loop code?

it's more simple to us help you.

thanks

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Rob

Former Member
0 Kudos

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