[ABAP] CHECK / CONTINUE / EXIT / RETURN


How to Work With Check, Countinue, Exit, Stop and Return in SAP ABAP Program


๐ŸŒ CHECK


  • ์กฐ๊ฑด์— ๋”ฐ๋ผ loop๋‚˜ Processing block ์ข…๋ฃŒ

  • ํ˜„์žฌ CHECK ๊ตฌ๋ฌธ์˜ ์กฐ๊ฑด์ด false๋ผ๋ฉด CHECK ์ดํ›„์˜ ๊ตฌ๋ฌธ์€ ๊ฑด๋„ˆ๋›ฐ๊ณ , ๋‹ค์Œ loop ์‹คํ–‰

  • ํ•ด๋‹น ์กฐ๊ฑด์ด ๋งž๋Š” ๊ฒฝ์šฐ๋งŒ ์ž‘์—… ์ˆ˜ํ–‰


๐ŸŒ CONTINUE


  • LOOP-ENDLOOP, DO-ENDDO, WHILE-ENDWHILE ์•ˆ์—์„œ ํ•ด๋‹น ์กฐ๊ฑด์— ๋Œ€ํ•œ ์‹คํ–‰์„ ๊ฑด๋„ˆ๋›ฐ๊ธฐ ์œ„ํ•จ

  • ํ˜„์žฌ loop๋ฅผ ๊ฑด๋„ˆ๋›ฐ๊ณ , ๋‹ค์Œ loop๋ฅผ ์ˆ˜ํ–‰


๐ŸŒ EXIT


  • ์กฐ๊ฑด์— ๋”ฐ๋ผ ์ „์ฒด loop๋‚˜ Processing block์„ ์ข…๋ฃŒ

  • IF-ENDIF ๋ฌธ์—์„œ ์‚ฌ์šฉ๋œ ๊ฒฝ์šฐ : ํ”„๋กœ๊ทธ๋žจ ์ข…๋ฃŒ

  • LOOP-ENDLOOP ๋ฌธ์—์„œ ์‚ฌ์šฉ๋œ ๊ฒฝ์šฐ : LOOP๋ฌธ ์ข…๋ฃŒ

  • FORM-ENDFORM ๋ฌธ์—์„œ ์‚ฌ์šฉ๋œ ๊ฒฝ์šฐ : Subroutine ์ข…๋ฃŒ


๐ŸŒ RETURN


  • ํ˜„์žฌ ์‹คํ–‰์ค‘์ธ ๋ธ”๋ก์„ ์ฆ‰์‹œ ์ข…๋ฃŒ

Categories:

SAP/ABAP