Video Lesson 4.10: ABAP Loops

Video Lesson 4.10: ABAP Loops

This lesson shows how to create loops in ABAP to iterate through a process.

Loops

In a loop, a statement block is executed several times in succession. There are four kinds of loops in ABAP:

  • Unconditional loops using the DO statement.
  • Conditional loops using the WHILE statement.
  • Loops through internal tables and extract data sets using the LOOP statement.
  • Loops through datasets from database tables using the SELECT statement.

Unconditional Loops

  • To process a statement block several times unconditionally, use the following control structure:
  • DO [n TIMES] ...
      [statement_block]
    ENDDO.
  • Use the TIMES addition to restrict the number of loop passes to n.
  • If you do not specify any additions, the statement block is repeated until it reaches a termination statement such as EXIT or STOP.

Share this on Social Media

Facebook
Twitter
LinkedIn
Pinterest
WhatsApp

Unit 1 – SAP System Architecture

Unit 2 – Object Navigator, Repository and ABAP Programs

Unit 3 – Transparent tables in the ABAP Dictionary

Unit 4 – Basic ABAP statements, ABAP Structures and ABAP Logical Expressions

Unit 5 – ABAP Data Retrieval

Unit 6 – SAP Analysis Tools

Unit 7 – ABAP Subroutines

Unit 8 – ABAP Events

Unit 9 – ABAP User Interface

Unit 10 – Function Modules, Methods, ALV and BAPI

Unit 11 – Adjusting SAP Standard Software

Unit 12 – ABAP Debugger, Selection Screens, and Table Controls

Unit 13 – ABAP Web Dynpro

Unit 14 – Advanced Topics

Unit 15 – Advanced Topics II

Object Oriented (OO) ABAP

ABAP for SAP HANA (Introduction)

OData and SAP Netweaver Gateway