This lesson will show you how to create a VIEW in the ABAP dictionary. VIEWS are used to join 2 or more tables and store that JOIN in the ABAP dictionary to use in other programs without having to perform JOIN through code.
Database View
Database views are implement an inner join, that is, only records of the primary table (selected via thejoin operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
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.