Skip to Content

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

Do loop doesn't seem to be looping.

Hi.

I incorporated a DO loop in a subroutine, but it doesn't seem to be working.

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

FORM VALIDATE_FILEPATH.

DO 10 TIMES.

SELECT AREA_A_FILE_MAND INTO MAND_CHECK FROM ZSCSDM_OF

WHERE OBJECT_ID = 'STUD' AND FILE_NUMBER = SY-INDEX.

ENDSELECT.

MESSAGE E002(ZMSGGARY) WITH SY-INDEX.

ENDDO.

ENDFORM.

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

The message will always return 1 (i.e. SY-INDEX is always = 1)

Thanks

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question