How to define types and data objects
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:
- 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...
- 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 [...]...
- 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...
- 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...
- 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...
















Leave a Reply