Menurut Wikipedia : a while loop is a control flow statement that allows code to be executed repeatedly based on a given boolean condition. The while loop can be thought of as a repeating if statement.

WHILE memungkinkan kita membuat aliran kode untuk mengeksekusi perintah secara berulang-ulang berdasarkan kondisi yang diberikan.


Berikut langkah-langkah untuk mencoba membuat perulangan while di dalam SAP menggunakan bahasa pemrograman ABAP.

TCode : SE38.

Langkah 1  – Ketik nama program report “YWHILE”.

Langkah 2  – Klik “Create”.

Langkah 3  – Ketik title / judul program report “Latihan While”.

Langkah 4  – Pilih Type “Executable program”.

Langkah 5  – Pilih Status “Test Program”.

Langkah 6 – Klik “Create”.

Langkah 7  – Klik “Local Object”.

Langkah 8 – Ketik code program :

DATA: a type i.
a = 0.
WHILE a <= 8.
  Write: / 'This is the line:', a.
  a = a + 1.

Langkah 9 – Klik “Activate”.

Langkah 10 – Klik “Direct Processing”.

Wahyu Amaldi, M.Kom has written 87 articles

Hi Reader, thank you for read this article, i hope this article can be useful.
If you will share knowladge to me, dont forget contact to me.

Email 1 :
Email 2 :

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>