SAP Database - The Unofficial SAP Knowledge Base

Free Business and Tech Magazines and eBooks

ABAP Programs: Using internal tables as snapshots of database tables

Print This Post Email This Post Written by admin on Nov 27th, 2007 | Filed under: ABAP Programs

REPORT ZSOURCE1103.
* Work area for a database table
TABLES CUSTOMERS.
* Internal table
DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
WITH HEADER LINE.
* Filling the internal table with all entries of the database table
SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS.
* Displaying the contents of the internal table
LOOP AT ALL_CUSTOMERS.
WRITE: / ALL_CUSTOMERS-NAME.
ENDLOOP.

~~~~~ end of post ~~~~~

———————
ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com

If you like this post, you may as well like these too:

  1. Source Code: Working with database tables and internal tables REPORT ZSOURCE0103. * Declaration of a work area for a Dictionary tableTABLES CUSTOMERS. * Internal table used as snapshot of the database tableDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER...
  2. ABAP Programs: Records and internal tables REPORT ZSOURCE0407. * Records (or structures) consist of a fixed number of componentsDATA: BEGIN OF CUSTOMER, ID(8) TYPE N, NAME(25), TELEPHONE(12), END OF CUSTOMER. * Working with the different components...
  3. ABAP Programs: Using Internal Tables for Selection Criteria REPORT ZSOURCE1112.* Work areasTABLES: CUSTOMERS, BOOKINGS.* Internal tablesDATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 500 [...]...
  4. ABAP Programs: Internal tables with header lines REPORT ZSOURCE1202.* Work area for a database tableTABLES CUSTOMERS.* Defining an internal table with header lineDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.* Reading all entries of the database...
  5. ABAP Programs: Filling an internal table from a database table REPORT ZSOURCE1203.* Work area for a database tableTABLES CUSTOMERS.* Defining an internal table with header lineDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.* Filling the internal table (previous content...



This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

One Response to “ABAP Programs: Using internal tables as snapshots of database tables”

  1. The job you are doing is excellent. Lot of people getting benefited from this site.

    Regards,
    Imtiyaz

Leave a Reply

  • Subscribe to RSS

  • Free Ebooks