1 / 45

Introduction to the ABAP Data Dictionary

Introduction to the ABAP Data Dictionary. Lecture Overview. Describe the ABAP database layer and selected core tables. A First few SAP Tables. T000 is the client table T001 is the company code table Currency and language are defined here Accounting chart of accounts

yered
Télécharger la présentation

Introduction to the ABAP Data Dictionary

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to the ABAP Data Dictionary

  2. Lecture Overview • Describe the ABAP database layer and selected core tables

  3. A First few SAP Tables • T000 is the client table • T001 is the company code table • Currency and language are defined here • Accounting chart of accounts • T006 is for measurement (unit of measure)There are tables for currency conversion • BKPF and BSEG are the FI header and transaction tables

  4. Getting Started with the ABAP Database Layer • Remember that we work with data logically through ABAP, rather than operating on the physical database • The database layer supplies extensive metadata beyond most native databases • We do not touch the underlying (native) database

  5. Data Dictionary Transaction Codes • Transaction code SE16 gets us to the Data Browser • Transaction code SE11 gets us to the ABAP Dictionary

  6. Data Browser (Introduction) • The Data Browser allows us to display data from a table • By default the cryptic field name is displayed in most screens • Settings / UserParameters (Data Browser tab) allows you to select the field label

  7. Data Browser (Select Table) • Select the desired table • You need to know the table names and meaning of fields

  8. Data Browser (Table Output)

  9. Data Browser • Search for table

  10. The ABAP Dictionary (Accessing) • Transaction code SE11

  11. ABAP Dictionary Elements • Tables • Views • A view is created from one or more tables • Data types • Data elements • Structured types

  12. ABAP Dictionary Elements (Illustration)

  13. ABAP Dictionary Elements (Tables) • A superset of what we usually think of as a table • There are different types of tables • Transparenttables are used to store business data • Pooltables and clustertables generally store applications • ABAP programs are stored in the database itself in pool and cluster tables

  14. ABAP Dictionary Elements (Tables - Transparent) • Tables contain • Fields having a field name and a data type • Foreign keys describe relationships between other tables • Technical settings describe how the table is created in the database • Indexes

  15. ABAP Dictionary Elements (Views) • In general database terms, it’s a virtual table that is not physically stored • SAP has types of views based on the underlying fundamental database operations • The SAP views are semantic (more later)

  16. ABAP Dictionary Elements (Views – Types) • Database – These are views from one or many tables • Projection views apply to only one table and restrict the number of fields to display • Structure views are pretty much obsolete

  17. Creating a Table (Steps) • Rules for table names • Creating the table • Creating the fields

  18. Creating a Table (Table Names) • 16 case insensitive characters • Customer (created) tables should begin with the characters Z or Y • You can use anything for a field name • Other namespaces (SAP) are letter sequences enclosed by slashes /SAPPRESS/

  19. Creating a Table (Maintenance)

  20. Creating a Table (Attributes) • Change and language information • Packages group objects (including tables) • They control transport behavior • They organize objects • Objects without a package cannot be transported

  21. Creating a Table (Delivery and Maintenance) • Descriptive information • The delivery class drives the transport of data records during install, upgrade, …

  22. Creating a Table (Delivery and Maintenance) • The following controls dictionary rights

  23. Creating a Table(Package) • The Package $TMP is a special local package

  24. Domains / Data Elements / Fields • Most of you are used to database fields having some primary data type • Integer, double , date, string, etc. • SAP utilizes another layer of indirection called a domain • A domain has one or many data elements • A data element can be used in one or many table fields

  25. Field Domains • Fields have a data element, which belongs to a domain

  26. Company Code (Example) • One of the core SAP concepts is the Company Code • The domain BUKRS defines the company code as a CHAR (4)

  27. Company Code (Example) • And the domain BUKRS is used in many places • Where used button

  28. Company Code (Example) • The Data element BUKRS belongs to the domain BUKRS

  29. Company Code (Example) • And BUKRS is used in the following tables

  30. Field Domains (Summary) • Field domains are themselves stored in a table • So are table fields and data elements

  31. Field Domains (Creating) • I prefer to create the domains and then create the fields • Your book suggests forward navigation • DON’T FORGET TO ACTIVATE THEM

  32. Creating a Data Element (1) • Select the domain to which the element applies

  33. Creating a Data Element (2) • This is where the field titles come from for forms and other places

  34. Creating a Table (Fields) • Table fields work a bit differently in SAP • In SAP fields belong to a domain • It’s the domain that defines • The data type • The value range • Domains must be activated before they can be used

  35. Creating a Table (Fields)

  36. Creating a Table (Fields) • Field name • Key fields uniquely identify a row • Composite keys can have a maximum of 16 key fields • Give a field an initial value • The Data Element field defines the field’s data type • You can use predefined data types or create new ones

  37. Dictionary Technical Settings (1) • With the desired table active, select GoTo, Technical Settings • These technical settings describe how the system treats the table • Data Class defines the ‘physical’ area of the database where the table is stored • Master data, transactional data, organizational data

  38. Dictionary Technical Settings (2) • Size category defines the number of records expected • Buffering whether a record or table is buffered (prefetched into the work area) when accessed

  39. Dictionary Technical Settings (Illustration)

  40. Entering Data • While the Display table screen is active, click Utilities / Table contents / Create Entries

  41. Object Navigator • It’s used to organize programing in the SAP integrated development environment • Repository Browser is the primary code storage area • The Repository Information System is used to search for programming objects • The Transport Organizer manages changes made during configuration and development and propagates (transports) changes to test and production systems

  42. Object Navigator (Illustration) Select object type from Object List

  43. Repository Browser (Object Lists) • The application hierarchy contains all development objects • A package contains logically related development objects • In this class, we will create local objects, which are not transported to QA / production systems

  44. Packages (Contents) • Packages contain many things • Programs containing fields, events, subroutines, screens, and so on • Function groups are containers for functions (external procedure calls) • Dictionary objects contain (roughly speaking) references to SAP data • Remember, all data is processed through the SAP API • SHOW PACKAGE FARC

  45. Classes / Interfaces • SAP supports an OOP approach to development using classes and interfaces

More Related