SAP Database - The Unofficial SAP Knowledge Base

Free Business and Tech Magazines and eBooks

How to define types and data objects

Print This Post Email This Post Written by admin on Oct 29th, 2007 | Filed under: ABAP, ABAP Programs

REPORT CHAP0101.

* Elementary type character, length 20
DATA CUSTOMER_NAME(25) TYPE C.

* Non-elementary type
TYPES T_NAME(25) TYPE C.
DATA NEW_CUSTOMER_NAME TYPE T_NAME.

* Reference to a data object
DATA VENDOR_NAME LIKE CUSTOMER_NAME.

* Record
DATA: BEGIN OF BOOKING,
ID(4) TYPE C,
FLIGHT_DATE TYPE D,
NAME LIKE CUSTOMER_NAME,
END OF BOOKING.

* Internal table
DATA BOOKING_TABLE LIKE BOOKING OCCURS 100.
———————
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: 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...
  2. 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 [...]...
  3. Define Document Types for Cash Journal Document You can select existing document types for cash journal documents, or define new document types in this activity. You must have document types for the following postings: G/L account postings...
  4. 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...
  5. DEFINE : ABAP Keyword a day DEFINE Basic formDEFINE macro.EffectDefines a program component (macro) under the name macro . It must consist only of ABAP/4 statements and is expanded at compilation time.A macro should always be...



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