SAP Database - The Unofficial SAP Knowledge Base

Free Business and Tech Magazines and eBooks

ABAP Source Code: Three approaches to define data objects

Print This Post Email This Post Written by admin on Nov 2nd, 2007 | Filed under: ABAP Programs

REPORT ZSOURCE0401.

* 1. Elementary types

DATA: CUSTOMER_NAME_1(25) TYPE C,
VENDOR_NAME_1(25) TYPE C.

* 2. Reference to an existing field
DATA: CUSTOMER_NAME_2(25) TYPE C,
VENDOR_NAME_2 LIKE CUSTOMER_NAME_2.

* 3. Reference to a non-elementary type
TYPES T_NAME(25) TYPE C.
DATA: CUSTOMER_NAME_3 TYPE T_NAME,
VENDOR_NAME_3 TYPE T_NAME.

———————
ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com

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

  1. 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...
  2. How to define types and data objects REPORT CHAP0101. * Elementary type character, length 20DATA CUSTOMER_NAME(25) TYPE C. * Non-elementary typeTYPES T_NAME(25) TYPE C.DATA NEW_CUSTOMER_NAME TYPE T_NAME.* Reference to a data objectDATA VENDOR_NAME LIKE CUSTOMER_NAME. * RecordDATA:...
  3. 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...
  4. 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 *...
  5. ABAP Programs: Complex Non-Elementary Types and Data Objects REPORT ZSOURCE0408. * Nested recordsTYPES: BEGIN OF ADDRESS, CITY(25), STREET(30), END OF ADDRESS, BEGIN OF PERSON, NAME(25), ADDRESS [...]...



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