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 of the program name REPORT ZSOURCE0301. * Displaying the words 'Customer list' on the screen WRITE / 'Customer list'. * Using an addition of the write command WRITE AT /10 'Customer list'. * Using single quotation marks within the text of a literal WRITE / 'Customer''s Name'. * Here is a comment with an asterisk in the first column WRITE / 'Ms O''Connor'. "This is a comment at the end of the line * A field of type character and length 40 DATA TARGET_STRING(40) TYPE C. * Statements may extend over several lines * (e.g., copying fields using the move command): MOVE 'Source string' TO TARGET_STRING. WRITE / TARGET_STRING. * Combining Statements WRITE: / 'Customer list', 'Bookings'. |
If you like this post, you may as well like these too:
- 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: 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...
- Source Code: Designing a report REPORT ZSOURCE0104. * 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...
















Leave a Reply