02_ABAP Dictionary Objects

Embed Size (px)

Citation preview

  • 8/6/2019 02_ABAP Dictionary Objects

    1/93

    ABAP Dictionary ObjectsBC030_03.1

    ABAP Dictionary Objects

    Tables

    Data Elements

    Domains

    Using a Table in an ABAP Program

  • 8/6/2019 02_ABAP Dictionary Objects

    2/93

    ABAP Dictionary ObjectsBC030_03.2

    Accessing the ABAP Dictionary

  • 8/6/2019 02_ABAP Dictionary Objects

    3/93

    ABAP Dictionary ObjectsBC030_03.3

    Basic Objects of the ABAPData Dictionary

    Table CTable BTable A

    Data Element 1 Data Element 2

    DomainDomain

  • 8/6/2019 02_ABAP Dictionary Objects

    4/93

    ABAP Dictionary ObjectsBC030_03.4

    Tables

    TABLE KNA1TABLE KNA1(Customers)(Customers)

    Name 1 ORT 02MANDT KUNNRTable: KNA1Table: KNA1

  • 8/6/2019 02_ABAP Dictionary Objects

    5/93

    ABAP Dictionary ObjectsBC030_03.5

    Create a Table

    Enter a description (short text).

    Maintain delivery class

    Table Maintenance attributes

  • 8/6/2019 02_ABAP Dictionary Objects

    6/93

    ABAP Dictionary ObjectsBC030_03.6

    Create a Table

    Maintain field attributes

  • 8/6/2019 02_ABAP Dictionary Objects

    7/93

    ABAP Dictionary ObjectsBC030_03.7

    Two-Level Domain Concept

    Data Element 1 Data Element 2

    DomainDomain

  • 8/6/2019 02_ABAP Dictionary Objects

    8/93

    ABAP Dictionary ObjectsBC030_03.8

    Data Elements

    Table BTable A

    Data Element 1

  • 8/6/2019 02_ABAP Dictionary Objects

    9/93

    ABAP Dictionary ObjectsBC030_03.9

    Pre-Defined Data Elements

  • 8/6/2019 02_ABAP Dictionary Objects

    10/93

    ABAP Dictionary ObjectsBC030_03.10

    Data Element Documentation

  • 8/6/2019 02_ABAP Dictionary Objects

    11/93

    ABAP Dictionary ObjectsBC030_03.11

    Create Data Element

    Enter a description (short text).

    Enter domain name.

  • 8/6/2019 02_ABAP Dictionary Objects

    12/93

    ABAP Dictionary ObjectsBC030_03.12

    Create Data Element

    Maintain field labels and column headers.

  • 8/6/2019 02_ABAP Dictionary Objects

    13/93

    ABAP Dictionary ObjectsBC030_03.13

    Domains

    Table ATable A

    Data ElementsData Elements

    DomainDomain

  • 8/6/2019 02_ABAP Dictionary Objects

    14/93

    ABAP Dictionary ObjectsBC030_03.14

    Characteristics of Domains

    Table ATable A

    Data ElementsData Elements

    DomainDomain

  • 8/6/2019 02_ABAP Dictionary Objects

    15/93

    ABAP Dictionary ObjectsBC030_03.15

    Allowed Values

    Value Table

    DomainDomain DomainDomain

    January

    February

    March.......

    December

  • 8/6/2019 02_ABAP Dictionary Objects

    16/93

    ABAP Dictionary ObjectsBC030_03.16

    validvalues

    invalidvalues

    Benefits of Using Allowed Values

  • 8/6/2019 02_ABAP Dictionary Objects

    17/93

    ABAP Dictionary ObjectsBC030_03.17

    Create a Domain

    Enter a description (short text).

    Enter data type and length.

  • 8/6/2019 02_ABAP Dictionary Objects

    18/93

    ABAP Dictionary ObjectsBC030_03.18

    Create a Domain

    Explicit values or a value

    table may be entered.

  • 8/6/2019 02_ABAP Dictionary Objects

    19/93

    ABAP Dictionary ObjectsBC030_03.19

    Using a Table in Program Code

    TABLES: YEMPLOY.

    SELECT *FROM YEMPLOY.

    WRITE: / YEMPLOY_IDYEMPLOY_NAME

    YEMPLOY_SALARY

    ENDSELECT.

  • 8/6/2019 02_ABAP Dictionary Objects

    20/93

    ABAP Dictionary ObjectsBC030_03.20

    Foreign Key Relationships

    Definition & Uses of Foreign Keys

    Prerequisites for Constructing Foreign Key Relationships

    Key Terminology

    Cardinality and Foreign Key Field Types

    Foreign Keys with Multiple Fields

  • 8/6/2019 02_ABAP Dictionary Objects

    21/93

    ABAP Dictionary ObjectsBC030_03.21

    Definition ofForeign Keys

  • 8/6/2019 02_ABAP Dictionary Objects

    22/93

    ABAP Dictionary ObjectsBC030_03.22

    Uses ofForeign Keys

    Maintain data integrity

    Provide help texts

    Create aggregate dictionary objects

  • 8/6/2019 02_ABAP Dictionary Objects

    23/93

    ABAP Dictionary ObjectsBC030_03.23

    Prerequisites forConstructingForeign Key Relationships

    The foreign key field and the primary key of the checktable must share the same domain.

    A value table must exist for that domain.

  • 8/6/2019 02_ABAP Dictionary Objects

    24/93

    ABAP Dictionary ObjectsBC030_03.24

    Check TableCheck Table

    Value TableValue Table

    Foreign Keys: KeyTerminology

    Foreign Key TableForeign Key Table

  • 8/6/2019 02_ABAP Dictionary Objects

    25/93

    ABAP Dictionary ObjectsBC030_03.25

    CheckTable ValueTable

    Foreign KeyTerminology:CheckTable = Value Table

  • 8/6/2019 02_ABAP Dictionary Objects

    26/93

    ABAP Dictionary ObjectsBC030_03.26

    Foreign KeyTerminology:CheckTable { Value Table

    Check

    Table

    Value

    Table

  • 8/6/2019 02_ABAP Dictionary Objects

    27/93

    ABAP Dictionary ObjectsBC030_03.27

    Establishing a Foreign KeyRelationship in the ABAP Dictionary

  • 8/6/2019 02_ABAP Dictionary Objects

    28/93

    ABAP Dictionary ObjectsBC030_03.28

    Cardinality

    nn :: mm1

    C

    1

    C

    N

    CN

  • 8/6/2019 02_ABAP Dictionary Objects

    29/93

  • 8/6/2019 02_ABAP Dictionary Objects

    30/93

    ABAP Dictionary ObjectsBC030_03.30

    Foreign KeyType:KeyFields or KeyField

    Candidates

    Faculty Course

  • 8/6/2019 02_ABAP Dictionary Objects

    31/93

    ABAP Dictionary ObjectsBC030_03.31

    Foreign KeyType:KeyFields of a TextTable

    T005(Country Codes)

    (T002)(Language Codes)

    T005T(Country descriptions)

  • 8/6/2019 02_ABAP Dictionary Objects

    32/93

    ABAP Dictionary ObjectsBC030_03.32

    Foreign KeyType:Non-KeyFieldCandidates

    Course

    Professor

  • 8/6/2019 02_ABAP Dictionary Objects

    33/93

    ABAP Dictionary ObjectsBC030_03.33

    Creating a Foreign Key Relationship

    Foreign key push-button

  • 8/6/2019 02_ABAP Dictionary Objects

    34/93

    ABAP Dictionary ObjectsBC030_03.34

    Maintaining a Foreign KeyRelationships Attributes

    Check table(defaults tovalue table)

    Enter a description (short text).

    Maintain cardinality n : m

    Maintain foreignkey type

  • 8/6/2019 02_ABAP Dictionary Objects

    35/93

    ABAP Dictionary ObjectsBC030_03.35

    Foreign Keys with Multiple Fields

  • 8/6/2019 02_ABAP Dictionary Objects

    36/93

    ABAP Dictionary ObjectsBC030_03.36

    Check TableCheck Table

    Field-By-Field Assignment

    Foreign Key TableForeign Key Table

  • 8/6/2019 02_ABAP Dictionary Objects

    37/93

    ABAP Dictionary ObjectsBC030_03.37

    PartialForeign Keys

  • 8/6/2019 02_ABAP Dictionary Objects

    38/93

    ABAP Dictionary ObjectsBC030_03.38

    ConstantForeign Keys

  • 8/6/2019 02_ABAP Dictionary Objects

    39/93

    ABAP Dictionary ObjectsBC030_03.39

    Changing the Field Assignment

    Generic foreign keyGeneric foreign key

    Constant foreign keyConstant foreign key

  • 8/6/2019 02_ABAP Dictionary Objects

    40/93

    ABAP Dictionary ObjectsBC030_03.40

    ABAP DictionaryTablesin Relational Databases

    SAP Table Types

    Technical Settings

    Indexes

  • 8/6/2019 02_ABAP Dictionary Objects

    41/93

    ABAP Dictionary ObjectsBC030_03.41

    SAPTable Types

    Transparent

    Table(TRANSP) Structure (INTTAB)

    Pool Table Cluster Table

    View

  • 8/6/2019 02_ABAP Dictionary Objects

    42/93

    ABAP Dictionary ObjectsBC030_03.42

    TransparentTablesType = TRANSP

    Master DataMaster Data

  • 8/6/2019 02_ABAP Dictionary Objects

    43/93

    ABAP Dictionary ObjectsBC030_03.43

    Table Types TRANSPin the Database

    DB

    PROFILE

  • 8/6/2019 02_ABAP Dictionary Objects

    44/93

    ABAP Dictionary ObjectsBC030_03.44

    Mapping a Table ofType INTTAB

    DB

    PROFILE

  • 8/6/2019 02_ABAP Dictionary Objects

    45/93

    ABAP Dictionary ObjectsBC030_03.45

    Pool andClusterTables:Overview

    Pool Table ClusterTableClusterTable

  • 8/6/2019 02_ABAP Dictionary Objects

    46/93

    ABAP Dictionary ObjectsBC030_03.46

    MasterTransactionOrganization &

    Customizing User

    TechnicalSettings

    Data class

    Number of data records inDB storage

    Single records, generic,full, not buffered

    on or off

    Size category

    Buffering

    Log data changes

  • 8/6/2019 02_ABAP Dictionary Objects

    47/93

    ABAP Dictionary ObjectsBC030_03.47

    Master data User data

    Data Class

    Organization andCustomizing data

    Transaction data

    DB

  • 8/6/2019 02_ABAP Dictionary Objects

    48/93

    ABAP Dictionary ObjectsBC030_03.48

    Size Categories

  • 8/6/2019 02_ABAP Dictionary Objects

    49/93

    ABAP Dictionary ObjectsBC030_03.49

    BufferingType

    None

    Single Record Generic

    Full

    KF1 KF2 KF3 F4 F5 F6 KF1 KF2 KF3 F4 F5 F6

    KF1 KF2 KF3 F4 F5 F6

  • 8/6/2019 02_ABAP Dictionary Objects

    50/93

    ABAP Dictionary ObjectsBC030_03.50

    Logging

  • 8/6/2019 02_ABAP Dictionary Objects

    51/93

    ABAP Dictionary ObjectsBC030_03.51

    MaintainingTechnicalSettings

  • 8/6/2019 02_ABAP Dictionary Objects

    52/93

    ABAP Dictionary ObjectsBC030_03.52

    Index

  • 8/6/2019 02_ABAP Dictionary Objects

    53/93

    ABAP Dictionary ObjectsBC030_03.53

    DB

    Database Utility

  • 8/6/2019 02_ABAP Dictionary Objects

    54/93

    ABAP Dictionary ObjectsBC030_03.54

    ABAP RepositoryInformation System

    The Repository Information System

    Object Searches (Find)

    Use of Objects in Objects (Where-Used)

    Searching for Objects Outside the Dictionary

  • 8/6/2019 02_ABAP Dictionary Objects

    55/93

    ABAP Dictionary ObjectsBC030_03.55

    ABAPABAPDictionaryDictionary

    Find (Object Search)Find (Object Search)

    Find all objects ofFind all objects oftype A withtype A with

    attributes X, Y, Z.attributes X, Y, Z.

    WhereWhere--used listsused lists

    Find all objects ofFind all objects oftype A that usetype A that use

    object Bobject B

    ABAP Repository Info System:Typical Queries

  • 8/6/2019 02_ABAP Dictionary Objects

    56/93

    ABAP Dictionary ObjectsBC030_03.56

    ABAP Repository: InitialScreen

  • 8/6/2019 02_ABAP Dictionary Objects

    57/93

    ABAP Dictionary ObjectsBC030_03.57

    Find: Selection Screen

    Enter a singleEnter a singlevalue forvalue for

    the searchthe searchattributes orattributes or

    use the arrowuse the arrowpushpush--buttonsbuttonsfor selectionfor selection

    optionsoptions

    Use the All SelectionsUse the All Selectionspushbutton to limit search criteriapushbutton to limit search criteria

    on other object attributeson other object attributes

  • 8/6/2019 02_ABAP Dictionary Objects

    58/93

    ABAP Dictionary ObjectsBC030_03.58

    Selection Options

    Simplified Selection (single values)

    =

    >