1 data dictionary 2

30
8/8/2019 1 Data Dictionary 2 http://slidepdf.com/reader/full/1-data-dictionary-2 1/30 Data Dictionary Day 2

Upload: shakun-gupta

Post on 10-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 1/30

Data Dictionary

Day 2

Page 2: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 2/30

We will learn about…

• What is Data Dictionary

• Data Dictionary Objects• System Fields

• Creating custom table

• Internal Tables• Foreign Keys & Cardinality

• Structures

• Views

Page 3: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 3/30

What is Data Dictionary

• is a system independent

interface to the database• is a virtual database ( data

about data)

• provides data for datamanipulation and data

processing

• Also called as DDIC and ABAP

Dictionary

Page 4: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 4/30

Data Dictionary Objects

• Data Element

• Domain

• Tables

• Structures

• Views

SE16

Page 5: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 5/30

Elementary Data Types

Type Explanation

C Text (Character)

N Numeric text

D Date (DDMMYYYY)

T Time (HHMMSS)

X Hexadecimal

I Integer

P Packed Number

F Floating point number

Page 6: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 6/30

Domain

• A Domain describes the technical structure of a field that is its size andits data types.

• Domains are attached to Data Elements

• Fields which refer to the same domain (with the assigned dataelements), are also changed when the domain is changed. This ensuresthat the fields are consistent

• Defines a value range which describes the valid data values for all the

fields which refer to this domain

Domain

MATNR

CLNT

Table MARA

Data Element

Page 7: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 7/30

Creating a Domain

Enter a description (short text)

Enter data type and length

Page 8: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 8/30

Creating a domain (contd.)

Enter fixed value and description.

Value table may be entered

Page 9: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 9/30

Data Element

• A data element gives the description of the field of theTable

• Examples of predefined data elements in SAP

 – LIFNR

 – KUNNR – MATNR

 – CLNT

Page 10: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 10/30

Creating a Data Element

Enter a description (short text)

Enter domain name

Page 11: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 11/30

Creating a Data Element

Maintain field labels and column headers.

Page 12: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 12/30

Difference between Domain & Data Element

Domain Data Element

Defines Technical Attributes such asdata type, length, allowed values, etc.

Defines semantic attributes such asdisplay length, short text, long text, etc

A domain can be part of several dataelements

A Data Element can point to only onedomain

Used to define data elements, restrictvalues (using value range, value table,etc)

Used to define fields of tables andscreens

Page 13: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 13/30

A Holistic view

Data element Data element

Domain

Table A Table B Table C

Page 14: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 14/30

Tables

• Tables are containers which stores data in the form ofrecord

• They are a central component of the SAP R/3 Application

• One or more fields form a data record (also known as tupel)

• A number of data records of the same type form a table• Examples of few SAP defined tables

 – MARA : Material Master

Page 15: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 15/30

Tables Contd…

The table definition contains the following components

Table fields: defines the field names and data types ofthe fields contained in the table.

Foreign Keys: defines the relationships between thetable and other tables.

Technical Settings: control how the table should be

created on the database.

Indexes: speed up the selection of data from the table.

Page 16: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 16/30

Tables Contd…

• Types of Tables

ABAP

Dictionary

ABAPProgram

Transparent

Cluster

Pool

Internal

T bl C td

Page 17: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 17/30

Tables Contd…

Page 18: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 18/30

Creating a Transparent Table – Step 1 of 6

Enter the Name of thetable (should begin

with “Z” or “Y”)

Enter the Name of thetable (should beginwith “Z” or “Y”)

Press the Create ButtonPress the Create Button

Page 19: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 19/30

Creating a Transparent Table – Step 2 of 6

Enter a description (short text)

Maintain delivery class

Table maintenance attribute

After making all entries,Press the “Fields” Tab

After making all entries,

Press the “Fields” Tab

Page 20: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 20/30

Creating a Transparent Table – Step 3 of 6

Maintain field attributes

Maintain data elements

After making all entries,Press the “TechnicalSettings” Button

After making all entries,Press the “TechnicalSettings” Button

Page 21: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 21/30

Creating a Transparent Table – Step 4 of 6

After making all entries,Press the Save Button.Once Technical Settings

are save, Press the“Back” Button (F3)

After making all entries,Press the Save Button.Once Technical Settingsare save, Press the“Back” Button (F3)

Page 22: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 22/30

Creating a Transparent Table – Step 5 of 6

Save, Check andActivate the Table. Afterthat Press the “Indexes”

Button on theApplication Toolbar

Save, Check andActivate the Table. Afterthat Press the “Indexes”Button on theApplication Toolbar

Page 23: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 23/30

Creating a Transparent Table – Step 6 of 6Steps to create an index

After entering the IndexFields and otherparameters, save andactivate the index, Z01

After entering the IndexFields and otherparameters, save and

activate the index, Z01

Page 24: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 24/30

SAP Transparent Tables

• Example of few SAP Transparent Tables

 – MARA : General Material Data

 – VBAK : Sales Document: Header Data

 – KNA1 : General Data in Customer Master

• Example of SAP Cluster Table – BSEG : Accounting Document Segment

Page 25: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 25/30

Tables Contd…

• Foreign Keys

 – Uses

• Maintain data integrity

• Provide help texts

• Create aggregate dictionary objects

 – Prerequisites• The foreign key text field and primary key of the check table must

share the same domain

• A value table must exist for that domain

Page 26: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 26/30

Tables Contd…

• Cardinality

 – Cardinality defines the type of

relationship between two tables

 – The cardinality of a foreign key

indicates how many dependent

records a record in a check

table may have

1 : 1

1 : C

1 : N

1 : CN

Cardinality Types

Page 27: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 27/30

System fields

• SAP has a system table named syst. It stores all thesystem related data

• Examples of few fields in this table are

 – Sy-datum : System Date

 – Sy-langu : System Language

 – Sy-subrc : System check

  – Sy-uzeit : System time

Page 28: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 28/30

SAP Data

ConfigurationData

MasterData

TransactionData

System

Data• Sales Orders• Purchase Orders• Journal Entries

• Goods Receipts

• G/L Accounts• Vendors

• Materials• Stock Locations

• Metadata• Programs

• Documentation• System Settings

• Currency Codes• Order Types• Payment Terms• Field Status Codes

Page 29: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 29/30

Structures

• A structure is defined like a table in the ABAP Dictionaryand can then be accessed from within ABAP programs

• Contain data temporarily during program runtime

• The same data elements and domains can be used in

structures as in tables

Page 30: 1 Data Dictionary 2

8/8/2019 1 Data Dictionary 2

http://slidepdf.com/reader/full/1-data-dictionary-2 30/30

Views

• A view combines the data distributed in several tables

• Views allow to gather information from fields of differenttables and present it to the users in form they requirewhen working in the R/3 system