SAP Database - The Unofficial SAP Knowledge Base

Free Business and Tech Magazines and eBooks

ABAP Programs: Working with Field symbols

Print This Post Email This Post Written by admin on Jan 28th, 2008 | Filed under: SAP General

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 < FS>.
* Using a Field Symbol which has an assigned field
WRITE < FS>.

If you like this post, you may as well like these too:

  1. 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....
  2. 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....
  3. 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...
  4. 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...
  5. ABAP Programs: Working with get events REPORT ZSOURCE1504. * Work areas TABLES BOOKINGS. * Reading data GET BOOKINGS. WRITE / BOOKINGS-FLDATE. ...



This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Reply

  • Subscribe to RSS

  • Free Ebooks