ABAP Programs:Using Field Symbols for components of a structure
REPORT ZSOURCE2403.
* Table work area for later use
TABLES CUSTOMERS.
* Defining a Field Symbol
FIELD-SYMBOLS <OUTPUT>.
* Displaying all fields of all table entries
SELECT * FROM CUSTOMERS.
NEW-LINE.
DO.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE CUSTOMERS TO < OUTPUT>.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
WRITE < OUTPUT>.
ENDDO.
ENDSELECT.
If you like this post, you may as well like these too:
- ABAP Programs: Working with Field symbols REPORT CHAP2401. * Defining a Field Symbol FIELD-SYMBOLS < FS>. * Variable for later use DATA FIELD VALUE 'X'. * Assigning a field to a Field Symbol ASSIGN FIELD TO...
- ABAP Programs :Using Field Symbols for variable parts of fields REPORT ZSOURCE2402. DATA: EXTERNAL_RECORD(4000), POSITION TYPE I, LENGTH TYPE N. FIELD-SYMBOLS < ENTRY>. EXTERNAL_RECORD = '0005Smith0007Edwards0005Young'. DO. LENGTH = EXTERNAL_RECORD+POSITION(4). IF LENGTH = 0. EXIT. ENDIF. ADD 4 TO POSITION....
- FIELD-SYMBOLS: ABAP Keyword a day FIELD-SYMBOLS: <fs>. FIELD-SYMBOLS: <fs> TYPE t. FIELD-SYMBOLS: <fs> TYPE LINE OF t. FIELD-SYMBOLS: <fs> LIKE s. FIELD-SYMBOLS: <fs> LIKE LINE OF s. Field Symbols are placeholders or symbolic names for...
- ABAP Programs: Using Symbols and Icons REPORT ZSOURCE0806. * Declaring symbols and iconsINCLUDE: , . * Displaying symbols and iconsWRITE: / SYM_PHONE AS SYMBOL, ‘telephone’, / SYM_FAX AS SYMBOL, ‘fax machine’, / SYM_LEFT_HAND AS SYMBOL, ‘hand...
- ABAP Programs: Simple examples of field conversion REPORT ZSOURCE0702. * Converting to numbers during computationsDATA: NUMBER_1(4) VALUE ’1771′, NUMBER_2(3), RESULT TYPE I. NUMBER_2 = ’005′.RESULT = NUMBER_1 + NUMBER_2.WRITE / RESULT. NUMBER_2 = ‘ 5′.RESULT = NUMBER_1...
- ABAP Symbols How To get these ABAP symbols in the program. Here is a sample program to generate ABAP symbols....
- FIELD-GROUPS: Abap keyword a day FIELD-GROUPS creates a field group for an extract dataset. FIELD-GROUPS: This statement would define a field group and these also define the actual line structure of extract dataset. Here is...
- ABAP Objects: Components of Class in ABAP Objects Components of Class in ABAP Objects DATA – for instance attributes METHODS – for instance methods EVENTS – for instance events Static components: CLASS-DATA – for static attributes CLASS-METHODS –...
- SAP Netweaver Components By providing an open integration and application platform and permitting the integration of the Enterprise Services Architecture, SAP NetWeaver helps unify business processes across technological boundaries, integrating applications for employees...
- Visibility of OOABAP Components in OOABAP, Each class component has a visibility. The whole class definition is separated into three visibility sections: PUBLIC : Data declared in public section can be accessed by the...
- 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...
- ABAP Programs: Importing from the ABAP/4 Memory REPORT ZSOURCE1402. * Internal tables which will be imported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH HEADER LINE, NEW_BOOKINGS LIKE BOOKINGS OCCURS...
- BC Basis Components – Release Notes Want the release notes just for the Basis Components, Download the Release Notes (PDF). BC-ABA ABAP Runtime Environment BC-BMT Business Management BC-CCM Computing Center Management System BC-MID Middleware BC-SEC Security...
- ABAP Programs: Exporting to the ABAP/4 Memory REPORT ZSOURCE1401. * Work areas TABLES: CUSTOMERS, BOOKINGS. * Internal tables which will be exported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH...
- Some Cool Programs in ABAP and the link is :- http://www.kabai.com/abaps/q.htm...



















Leave a Reply