SAP Database

SAP Certification, Ebooks, PDF’s, Articles, News, Tips and Tricks

Source Code: Designing a report

Written by admin on Nov 1st, 2007 | Filed under: ABAP Programs

REPORT ZSOURCE0104.

* Declaration of a work area for a Dictionary table
TABLES CUSTOMERS.

* Internal table used as snapshot of the database table
DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
WITH HEADER LINE.

* Definition of input fields on the report’s selection screen
SELECT-OPTIONS SNAME FOR CUSTOMERS-NAME.

* Reading the entries of the database table into an internal table
SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS
WHERE NAME IN SNAME.

* Displaying each line of an internal table
LOOP AT ALL_CUSTOMERS.
WRITE: / ALL_CUSTOMERS-NAME.
ENDLOOP.
———————
ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com

Random Posts



Leave a Reply

  • Sponsers

  • AMAZON Books