SAP / SAP Beginner (0 to 2 yrs) Interview questions
What is an internal table in ABAP?
An internal table is ABAP's in-memory equivalent of an array or list of structured rows — used to temporarily hold and process a set of data (often fetched from a database table) entirely within a running program, without needing to re-query the database for every operation on that data.
DATA: lt_customers TYPE TABLE OF kna1. SELECT * FROM kna1 INTO TABLE lt_customers WHERE land1 = 'US'. LOOP AT lt_customers INTO DATA(ls_customer). WRITE: / ls_customer-kunnr, ls_customer-name1. ENDLOOP.
Internal tables exist only for the duration of the program's execution (or until explicitly cleared); they're not persistent storage. They're the standard way ABAP programs work with sets of rows in memory, whether that data originated from a database query, was built up manually, or was passed in from another part of the program.
More Related questions...