ABAP Programs: Using table parameters
REPORT ZSOURCE1006.
* Work area of database table and internal table for later use
TABLES CUSTOMERS.
DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 50 WITH HEADER LINE.
* Calling a form with a table parameter
PERFORM READ_CUSTOMERS TABLES ALL_CUSTOMERS.
LOOP AT ALL_CUSTOMERS.
WRITE / ALL_CUSTOMERS-NAME.
ENDLOOP.
* Defining a form with a table parameter
FORM READ_CUSTOMERS TABLES F_CUSTOMERS STRUCTURE ALL_CUSTOMERS.
SELECT * FROM CUSTOMERS INTO TABLE F_CUSTOMERS.
ENDFORM.
———————
ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com
If you like this post, you may as well like these too:
- 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...
- ABAP Programs: A simple internal table REPORT ZSOURCE1201.* Work area for a database tableTABLES CUSTOMERS.* Defining an internal tableDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100.* Reading all entries of the database table into the internal tableSELECT...
- ABAP Programs: Modifying multiple entries in a database table REPORT ZSOURCE1306.* Work areaTABLES CUSTOMERS.* Internal table for changed entriesDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 50 WITH HEADER LINE.* Filling the internal tableSELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS WHERE...
- ABAP Programs : Inserting multiple entries in a database table REPORT ZSOURCE1302.* Work areaTABLES CUSTOMERS.* Internal table for new entriesDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.* Filling the internal tableALL_CUSTOMERS-ID = ‘12345678′.ALL_CUSTOMERS-NAME = ‘Brown’.APPEND ALL_CUSTOMERS.ALL_CUSTOMERS-ID = ‘11111111′.ALL_CUSTOMERS-NAME...
- ABAP Programs: Deleting multiple entries from a database table REPORT ZSOURCE1308.* Work areaTABLES CUSTOMERS.* Internal table for deleted entriesDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 50 WITH HEADER LINE.* Filling the internal tableSELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS WHERE...

















Leave a Reply