Source Code: Designing a report
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://www.erpdb.info
If you like this post, you may as well like these too:
- Source Code: Few simple examples 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30...
- ABAP Source Code: Character types REPORT ZSOURCE0403. * Type c is the default type when no type is specified.* Initial value is space, if it is not specified explicitly.DATA: NAME(25) TYPE C, CITY(25), FLAG, SINGLE_CHARACTER...
- ABAP Source Code: Types, data, constants REPORT ZSOURCE0402.* Type flag defines an abstract typeTYPES FLAG TYPE C. * Field address_flag will allocate space in main memory at runtimeDATA ADDRESS_FLAG TYPE FLAG VALUE ‘X’.* Constants are defined...
- ABAP Source Code: Three approaches to define data objects REPORT ZSOURCE0401.* 1. Elementary typesDATA: CUSTOMER_NAME_1(25) TYPE C, VENDOR_NAME_1(25) TYPE C. * 2. Reference to an existing fieldDATA: CUSTOMER_NAME_2(25) TYPE C, VENDOR_NAME_2 LIKE CUSTOMER_NAME_2. * 3. Reference to a non-elementary...
- 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...
- ABAP Source Code: Syntax of ABAP/4 Programs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 * Declaration...
- Transaction Code to Access Other Transaction Code with Values Many times in SAP, you may come across situations where in the users wants to have a separate transaction codes for some of the tables which can be easily maintained...
- Source List The purpose of the source determination process is to automatically assign a source of supply to a purchase requisition. If the requester has set the Source Determination indicator in the...
- How to Create Source List? Use Transaction ME01. Enter the Material Number and the Plant Data. Enter source list records, validity period, period of time material is procurable, Vendor Number, responsible Purchasing Organization (or number...
- What is the Source List? The Source List identifies preferred sources of supply for certain materials. If the Source List has been properly maintained, it will identify both the source of a material and the...



















Leave a Reply