Skip to Content
0
Former Member
Aug 08, 2007 at 09:43 AM

Loop problem

14 Views

HI Experts,

in my program, i dont know why its not getting inside the loop. below is my code. I have seen in the debugger mode that as the arror comes on Loop statement, after that it directly goes to next select statement. why it is not going inside the Loop. is there any thing missing in my code. plz help .its urgent.

IF SY-SUBRC = 0.

SORT IT_TRFRATE BY MATNR_TR.

LOOP AT IT_TRFRATE.

IF IT_EKKO-MATNR_LI = IT_TRFRATE-MATNR_TR AND N = 1.

IT_EKKO-TRFRATE = IT_TRFRATE-TRFRATE.

N = N + 1.

ENDIF.

ENDLOOP.

SELECT BEDAT RESWK INTO (IT_EKKO-BEDAT, IT_EKKO-RESWK)

FROM EKKO

WHERE EKKO~EBELN = IT_EKKO-EBELN.

ENDSELECT.

ELSE.

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

Thanks.

Khan.