Vous êtes sur la page 1sur 23

FI/CO MM

PP

SD

Cust. Dev.

SAP Kernel / Basis Database Operating System Hardware

FI/CO MM

PP

SD

Cust. Dev.

Data Dictionary SAP Kernel / Basis Database Operating System Hardware

Development Tools Development Tools

Quickview er SAP Query Report writer ABAP

SAPscript Remote Function Call (RFC) Business Application Programming Interface (BAPI)

Development Tools Development Tools

Intermediate Documents (IDOCS)

Application Link Enabling (ALE)

Legacy System Migration Workbench (LSMW)

Data Transfer Workbench (DX-WB) Business Information Warehouse

Function of the ABAP Dictionary Function of the ABAP Dictionary


DB objects DB objects
Table Table DB Table DB Table Data elements Table type Data elements Table type

Type definitions Type definitions


Structure Structure

Services Services
Screen Screen

Poss. Values Poss. Values

F4 F4

Basic Objects of the ABAP Basic Objects of the ABAP Dictionary Dictionary
Table
Table field

uses Data Element uses Domain

Difference Between Domain and Difference Between Domain and Data Element Data Element
= technical attributes e.g. data type, length = semantic attributes (context / usage) Personnel No. NUMC10 P.O. No. Invoice No.

Two-Level Domain Concept :: Two-Level Domain Concept Example Example Table SPLFI Table :: SPLFI
MANDT CARRID CONNID ... AIRPFROM ... AIRPTO

Data element S_FROMAIRP

Data element S_TOAIRP

Domain S_AIRPID

Structure of an Index Structure of an Index

SELECT * *FROM SELECT FROM SCOUNTER WHERE SCOUNTER WHERE AIRPORT ==LHR. AIRPORT LHR.

Binary search

AIRPORT P ACA 1 ACE 2 BER 3 BER 6 DEN 7 FRA 8 HAM 14 LCY 4 LCY 9 LGW 10 LHR 5 LHR 11 MUC 12 RTM 13

MANDT CARRID COUNTNUM AIRPORT 001 LH 00000005 ACA 001 BA 00000004 ACE 001 UA 00000001 BER 001 LH 00000002 LCY 001 BA 00000003 LHR 001 LH 00000007 BER 001 AA 00000001 DEN 001 LH 00000003 FRA 001 BA 00000001 LCY 001 LH 00000001 LGW 001 LH 00000004 LHR 001 BA 00000002 MUC 001 LH 00000006 RTM 001 LH 00000008 HAM

Index on AIRPORT

Data Access using the Buffer Data Access using the Buffer

ABAP program ABAP program


SELECT * FROM SBOOK SELECT * FROM SBOOK WHERE .. .. .. WHERE

R/3 table buffer R/3 table buffer

Database interface Database interface

DATABASE DATABASE

Foreign Keys & Check Tables Foreign Keys & Check Tables
Foreign key fields Foreign Key Table SPFLI Foreign Key Table SPFLI MANDT CARRID CONNID MANDT CARRID CONNID

......

Check field Check Table Check Table MANDT MANDT SCARR SCARR CARRID CARRNAME CARRID CARRNAME

CURRCODE CURRCODE

Key fields

Transparent Tables and Structures Transparent Tables and Structures

Table Table

ABAP Dictionary ABAP Dictionary

Structure Structure

Field1Field2Field3Field4 Field1Field2Field3Field4

Field1Field2Field3Field4 Field1Field2Field3Field4

Database Database
Table Table

Field1Field2Field3Field4

Physical definition of a table Physical definition of a table

Why do you Need Views? Why do you Need Views?


View on the tables

F1

F2

F3

F5

F8

View on data that is distributed on more than one table

F1 F2 F3 F1 F2 F3

F4 F5 F4 F5

F6 F7 F8 F6 F7 F8

Table 1

Table 2

Table 3

R/3 Standard Function: Input Help R/3 Standard Function: Input Help
Carrier LH Carrier LH No Depart. City Arrival city No Depart. City Arrival city 0400 Frankfurt New York 0400 Frankfurt New York

Maintenance of flights Maintenance of flights


Carrier Carrier Flight number Flight number .. .. ..
LH

0402 0402 2402 2402 ......

Frankfurt Frankfurt Frankfurt Frankfurt ......

New York New York Berlin Berlin ......

F4

ABAP Workbench ABAP Workbench

 ABAP Dictionary => manage data definitions / services  ABAP Dictionary  ABAP Editor  ABAP Editor
=> create programs

 Screen Painter  Screen Painter  Menu Painter  Menu Painter

 Function Builder => create / test functions  Function Builder  Object Navigator => organize and manage development  Object Navigator
environment

=> create screens => create interface

Types of ABAP Programs Types of ABAP Programs

Simple Report Program Dialog Program

Interactive Report Program Batch input program

ABAP Syntax ABAP Syntax

First word is key word Each statement ends with period Similar statements can be joined together You can insert comments

Simple Output // Formatting Simple Output Formatting Commands Commands

ULINE WRITE

SKIP FORMAT

REPORT

NEW PAGE

LISTHEADINGS

System Variables System Variables

Declared by the system Automatically filled by the system Examples: Examples: SY- DATUM (system date) SY- DATUM (system date) SY- UZEIT (system time) (system time) SY- UZEIT SU- UNAME (user id) SU- UNAME (user id)

See table SYST for complete list

Text Symbols Text Symbols

TEXT - xxx string(xxx)

(xxx is a three character string)