‎2006 Jul 28 9:16 AM
‎2006 Jul 28 9:23 AM
Hi,
You can use CONTINUE Statement .
Loop at it_tab.
IF errorvalue " check for error records
CONTINUE . "This will skip the rest of the code and
continue with next pass of the loop.
ELSE
" Write the rest of the code"
Endif
ENDLoop
Regards
Beena
‎2006 Jul 28 9:17 AM
If you have msgtyp in your table, then
Loop at itab where msgtyp <> 'E'.
endloop.
Regards,
Naimesh
Message was edited by: Naimesh Patel
‎2006 Jul 28 9:17 AM
Hi krithika,
1. we can use this logic
2. Loop at itab.
check field1 = 'wrong value'
check field3 = 'wrong value'
*----
*--- OTHER GOOD CODE
ENDLOOP.
regards,
amit m.
‎2006 Jul 28 9:19 AM
loop at itab.
if itab-value = wrong.
else.
* write ur code here.
endif.
endloop.
‎2006 Jul 28 9:22 AM
Hi,
For wg.
loop at itab.
if err = 'x'.
skip.
else.
continue.
endif.
endloop.
skip can't use within loop.
what's the alternative?
Regards,
bala.
‎2006 Jul 28 9:23 AM
Hi,
You can use CONTINUE Statement .
Loop at it_tab.
IF errorvalue " check for error records
CONTINUE . "This will skip the rest of the code and
continue with next pass of the loop.
ELSE
" Write the rest of the code"
Endif
ENDLoop
Regards
Beena
‎2006 Jul 28 9:28 AM
Hi,
You can comment out codes that looks/functions like the one below:
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Also, the type 'E' for msgtype means that it is an error.
Hope this helps...
P.S. Please award points for useful answers.