Video Lesson 4.1: Working With Elementary Data Objects
Lesson Overview
- In this lesson you will become familiar with the difference between data types and data objects and you will learn how to define and use these in a program. You will also learn some basic ABAP statements.
- You will be working with structures and internal tables, as well as program flow control and logical expressions.
Data Types and Data Objects
- A formal variable description is called data type. In contrast, a variable concretely defined by means of a data type is called data object.
- Let's have a look at the ABAP standard types predefined by SAP (implemented types) first.
- These are divided into two groups:
- Complete and
- incomplete types.
The following implemented ABAP standard types are complete.
- This means that they already contain the type-related, fixed length information:
- Complete ABAP standard types
- D
Type for date(D), format: YYYYMMDD, length 8 (fixed)
- T
Type for time (Time), Format: HHMMSS, length 6 (fixed)
- I
Type for integer (I), length 4 (fixed)
- F
Type for floating point number (F), length 8 (fixed)
- STRING
Type for dynamic length character string
- XSTRING
Type for dynamic length byte sequence (HeXadecimal string)
The following standard types do not contain a fixed length (incomplete). With these, the length of the variable has to be specified for data object definitions.
- C
Type for character string (Character) for which the fixed length is to be specified
- N
Type for numerical character string (Numerical character) for which the fixed length is to be specified
- X
Type for byte sequence (HeXadecimal string) for which the fixed length is to be specified
- P
Type for packed number (Packed number) for which the fixed length is to be specified. (In the definition of a packed number, the number of decimal points may also be specified.)
- For more information on predefined ABAP types, refer to the keyword documentation on the TYPES or DATA statement.