This document discusses data types in ABAP including predefined, local, and global data types. Predefined data types are either complete with a fixed length like date or incomplete without a fixed length like character strings. Local data types are declared in a program while global types are declared in the ABAP dictionary. Data objects like variables and constants are defined using a data type. Literals, text symbols, and predefined objects like Space and SY are also discussed.
3. Predifined Data types
● They are divide into two groups:
– Complete
● This means that they already contain a type-specific,
fixed length specification.
– D (Date, format YYYYMMDD)
– T (Time, format HHMMSS)
– I (Integer, length 4)
– F (Floating, length 8)
– STRING (Dynamic length character string)
– XSTRING (Dynamic length byte sequence, hexadecimal string)
4. Predifined Data types (2)
– Incomplete
● Do not contain a fixed length
– C (Character String)
– N (Numerical character string)
– X (Byte sequence, hexadecimal string)
– P (Packed number, decimals points may also be specified)
5. Local Data types
● Declared using standard data types
● Only exist in the program
● Declared using Types statement
6. Data types in ABAP Dictionary
● This are also called Global Data Types
● Can be used throught all the system
● Declared in the abap dictionary
7. Type Addition
● Used to refer any data type that is already
known.
● Visibility affects the Data Types
8. Type Addition (2)
● Type constructos used with the TYPE addition:
– For references
– REF TO <class>|<interface>
– For structures
– BEGIN OF <struct>.
...
– END OF <struct>.
– For tables
– <tabkind> OF <linetype> [WITH <key>]
9. Like Addition
● Used to refer to an already defined data object
● Can be used to refer any object declared an
visible in the context
● No need for the data object being referenced to
be in memory
12. Literals
● Belongs to the Fixed Data Object
● Used to especify fixed values in the programs
● Literals can be:
– Numeric literals
– Text literals
13. Text Symbols
● Stored in the Text pool
● Used to allow abap to be multilingual.
● They are identified with a three alfanumeric ID
● Can be Translated
14. Variables
● Are Data Objects that can be declared
● They can be declared using:
– DATA
– STATICS
– CLASS-DATA
– PARAMETERS
– SELECT-OPTIONS
– RANGES
15. Constants
● Defined by the keyword CONSTANTS
● Works similar to literals
● The value addition is mandatory
16. Interface Work Areas
● Are data objects that are used to pass data
between:
– Screens and ABAP programs
● Tables
– Logical databases and ABAP programs
● Nodes
– ABAP programs and external subrutines
● COMMON PART
17. Predifined Data Objects
● There is no need to be declared
● They are always present at runtime
● There are two:
– Space
– SY
● SY-SUBRC: Return code for ABAP statements
● SY-UNAME: logon name of the user
● SY-REPID: Current ABAP program
● SY-TCODE: current transaction
● SY-INDEX: Number of the current loop pass