ABAP LOOP AT – END LOOP( Reading Internal Table)

  Report Program

Overview

In ABAP, when joining / editing data, once the main data is stored in the internal table
A method of acquiring another table or processing the value for output is used.

Sample Code

***** Stored data for tests *****
DATA: IT_TABLE TYPE TABLE OF VBAK. " Refer Sales Order Header
WA_TABLE LIKE LINE OF IT_TABLE.    " Structure
SELECT * INTO TABLE IT_TABLE
FROM VBAK.

*In case check all data
LOOP AT IT_TABLE INTO WA_TABLE.
***** In case exists a data *****
ENDLOOP.

*In case it wants limited a data
LOOP AT IT_TABLE INTO WA_TABLE
  WHERE ERDAT = '20170808'.
***** In case exists a data *****
ENDLOOP.

Please refer here if getting one record