Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Inifinite looping of internal table?

Hi.

I have a piece of codes that loops through an internal table.

There isn't any syntax nor run-time errors, but my program seems to be hanging, even though there is only ONE record in my internal table!!

********************************************

DATA: UPLOAD_ITAB TYPE TABLE OF ZTA_S_CCA WITH HEADER LINE.

......

LOOP AT UPLOAD_ITAB.

....

APPEND UPLOAD_ITAB.

ENDLOOP.

********************************************

Is it because of the WITH HEADER LINE? But when i tried to remove it, I got a run-time error. Could anyone advise? Thanks.

Tags:
Former Member
Former Member replied

Hi,

DATA: UPLOAD_ITAB TYPE TABLE OF ZTA_S_CCA WITH HEADER LINE.
......
LOOP AT UPLOAD_ITAB.

UPLOAD_ITAB-LAST_CHGED_BY = SY-UNAME. 

modify UPLOAD_ITAB index sy-tabix. "<<<<<<<

ENDLOOP.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question