Upload
hoanganh
View
225
Download
2
Embed Size (px)
Citation preview
SAP vállalatirányítási rendszer
alapjai /6-7
• Tantárgy kódja: VEMI5344i
• Tanév: 2006/07 - 2.félév
• Előadó: dr. Varga Ernő, dr. Gerzson Miklós
• Dictionary
Dictionary - Tematika
• Bevezetés
• Táblák az ABAP Dictionary-ban
• Tábla hozzáférések performanciája
• Beviteli ellenőrzések
• Dictionary objektumok függőségei
• Tábla módosítások
• Nézetek
• Keresési segítségek
Célkitűzések
• Előismeretek:– SAP felhasználói ismeretek
– Adatbáziskezelési ismeretek (SQL)
• Célkitűzések:– ABAP Dictionary alapok elsajátítása
– ABAP Dictionary objektumok létrehozása
Bevezetés
• ABAP Dictionary funkciója az R/3 rendszerben
• Adatbázis objektumok definíciója
• Felhasználó által definiált típusok
• ABAP Dictionary szolgáltatások
• Kapcsolatok a fejlesztési és futásidőkörnyezetekkel
ABAP Dictionary funkciói
DB table
Services
Screen
Poss. values
Type definitions
Structure
Table typeData elements
F4
DB objects
Table
Adatbázis objektumok a Dictinary-ban
Database
Table 1
ABAP Dictionary
Table 2
View
Objects are automatically
created in the DB and
adjusted to changes
Típus definíciók a Dictionary-ban
ZIP Town name Street House no.
Numbers
Employee
Name Address Telephone
First name Last name Town Address
ABAP Dictionary szolgáltatások
Carrier
Flight number
. . .
Maintenance of flights
LH
No
.
Depart. city Arrival city
Carrier
0400 Frankfurt New York
0402 Frankfurt New York
LH
2402 Frankfurt Berlin
... ... ...
Code of the flight connection
Code defining a flight connectionbetween two cities, e.g. 0400Frankfurt - New York.
F1
F4
Kapcsolódás fejlesztési és futásidőkörnyezethez
ABAPDictionaryRead type
definitions
Reads structure of
database objects
Runtime environment
Developmentenvironment
ABAP
Interpreter
Screen
Interpreter
ABAP
tools
Screen
Painter Database
interface
Táblák az ABAP Dictionary-ban
• Kétszintű domén koncepció
• Leképezés a relációs adatbázisban
• Include struktúrák
• Technikai beállítások
Táblák és mezők
Key Function fields
Row
Table
Key 1
.
.
.
Key 2
.
.
.
Key n
.
.
.
F 1
.
.
.
F 2
.
.
.
F n
.
.
.
Dictionary alap objektumai
uses
uses
Table
Tablefield
Data elementData element
DomainDomain
Kétszintű domén elv: példa
Table SPFLI
MANDT
Data element S_FROMAIRPData element S_FROMAIRP Data element S_TOAIRPData element S_TOAIRP
Domain S_AIRPIDDomain S_AIRPID
CARRID ... AIRPFROMCONNID ... AIRPTO
Transzparens táblák és struktúrák
Table
Field 1Field 2 Field 3Field 4
Structure
Field 1Field 2 Field 3Field 4
ABAP Dictionary
Physical definition of the table
Table
Field 1 Field 2 Field 3 Field 4
Database
Include struktúrák
Table 2Table 1
Field 1 Field 2 Field A Field B Field 4Field 3 Field A Field B
Field A Field B
Database
Field 1 Field 2 Field A Field BField A Field B Field 3 Field 4
Include structure
Technikai beállítások
Buffering
Table buffer
R/3
In which physical
area of the database
should the table
be stored?
Logging
Should the records
of the table be
buffered? Should changes to
the data records be
logged?
How many records
will the table
probably contain?
Size category
Data class
Data base
Data base
Adat osztály
Tables in the ABAP Dictionary
Tablespace
Org. data
Tablespace
Master data
Tablespace
Trans. data
Tablespace
System data
Database
Organizational data Transaction data System dataMaster data
Table 1
Table 3
Table 4
Table 2
Table 6
Table 5
Table 9
Table 7
Table 8
Table 1
Table 3
Table 4
Table 2
Table 6
Table 5
Table 9
Table 7
Table 8
Méretkategória
Initial
Extent
First
Extent
Second
Extent
Technical Settings
Size category
TABA
TABB
TABC
1
3
4
TABATABA
TABBTABB
TABCTABC
Database
Loggolás
Application
transaction
Changea record
System profiles
rec/client =ALL
...
...
TAB
Field 2 Field 3 Field 5
TAB Log table
Field 1 Field 2 Field 3
Database
ABAP Dictionary
Log TABLog TAB
Performancia táblák olvasásakor
• Indexek– Elsődleges és másodlagos index
– Index felépítése
– Adathozzáférés index segítségével
• Tábla buferelés– Bufferelés előnyei
– Lokális tábla buferek
– Bufferelési típusok
– Buffer szinkronizáció
– Tábla bufferelés döntési szempontjai
Index felépítése
Table SCOUNTER
Index on
AIRPORT
MANDT CARRIDCOUNTNUMAIRPORT
001
001
001
001
001
001
001
001
001
001
001
001
001
001
LH
BA
UA
LH
BA
LH
AA
LH
BA
LH
LH
BA
LH
LH
00000005
00000004
00000001
00000002
00000003
00000007
00000001
00000003
00000001
00000001
00000004
00000002
00000006
00000008
ACA
ACE
BER
LCY
LHR
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
HAM
AIRPORT P
ACA
ACE
BER
BER
DEN
FRA
HAM
LCY
LCY
LGW
LHR
LHR
MUC
RTM
1
2
3
6
7
8
14
4
9
10
5
11
12
13
Binary
search
SELECT * FROM
SCOUNTER WHERE
AIRPORT = 'LHR'.
Olvasás index használatával
TABIndex A
F2 Z F1 F2 F3
10A3 10 Text
Index 0
F1 Z
Optimizer
SELECT * FROM TAB
WHERE F2 = `10´.
Program
Adatolvasás buffer alkalmazásával
Communication system
Database
Database interface
SELECT * FROM SBOOK
WHERE ...
ABAP programR/3 table buffer
Database
processes
Database
buffer
Tábla bufferelés
Application server 2Application server 1
Program reads data
from a buffered tableRecords are loaded
into the buffer
TAB
Database
Table bufferTable buffer
Program Program
Teljes bufferelés
Application server
SELECT * FROM SCOUNTER WHERE
MANDT = '001' AND CARRID = 'LH'
AND COUNTNUM = '00000004'.
Buffer contents
00000001
00000001
00000002
00000003
00000004
00000001
00000002
00000003
00000004
00000005
00000006
00000007
00000008
00000001
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
ACE
BER
LCY
LHR
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
HAM
Database table SCOUNTER
AIRPORTMANDT CARRID COUNTNUM
00000001
00000001
00000002
00000003
00000004
00000001
00000002
00000003
00000004
00000005
00000006
00000007
00000008
00000001
AA
BA
BA
BA
BA
LH
LH
LH
LH
LH
LH
LH
LH
UA
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
ACE
BER
LCY
LHR
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
HAM
AA
BA
BA
BA
BA
LH
LH
LH
LH
LH
LH
LH
LH
UA
Generikus bufferelés
Application server
Buffer contents
00000001
00000002
00000003
00000004
00000005
00000006
00000007
00000008
LH
LH
LH
LH
LH
LH
LH
LH
001
001
001
001
001
001
001
001
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
Database table SCOUNTER
MANDT CARRID COUNTNUM
00000001
00000001
00000002
00000003
00000004
00000001
00000002
00000003
00000004
00000005
00000006
00000007
00000008
00000001
AA
BA
BA
BA
BA
LH
LH
LH
LH
LH
LH
LH
LH
UA
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
ACE
BER
LCY
LHR
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
HAM
AIRPORT
SELECT * FROM SCOUNTER WHERE
MANDT = '001' AND CARRID = 'LH'
AND COUNTNUM = '00000004'.
Generic key
Egyedi rekord bufferelés
Buffer contents
00000004 LH001 LCY
Database table SCOUNTER
MANDT CARRID COUNTNUM
00000001
00000001
00000002
00000003
00000004
00000001
00000002
00000003
00000004
00000005
00000006
00000007
00000008
00000001
AA
BA
BA
BA
BA
LH
LH
LH
LH
LH
LH
LH
LH
UA
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
ACE
BER
LCY
LHR
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
HAM
AIRPORT
Application server
SELECT SINGLE * FROM SCOUNTER WHERE
MANDT = '001' AND CARRID = 'LH' AND
COUNTNUM = '00000004'.
Buffer szinkronizáció /1
Server 2
Buffer
TAB
SELECT * FROM TAB
WHERE FIELD = 'X'.
Server 1
Buffer
Synchronization table
11
22
TAB
Buffer szikronizáció / 2
SELECT * FROM TAB
WHERE FIELD = 'Y'.
Server 2
Buffer
TAB
Server 1
Buffer
Synchronization table
33
44
TABTAB
Buffer szinkronizáció / 3
Server 2
Buffer
TAB
DELETE * FROM TAB
WHERE FIELD = 'X'.
Server 1
Buffer
Synchronization table
TAB TAB
TAB modified by
Server 1
5566
77
Buffer szinkronizáció / 4
TAB
Synchronization table
TAB modified by
Server 1
SELECT * FROM TAB
WHERE FIELD = 'X'.
Server 2
Buffer
Server 1
Buffer
TAB TAB88
Buffer szinkronizáció / 5
Server 2
Buffer
TAB
Server 1
Buffer
Synchronization table
TAB TAB
TAB modified by
Server 1
9999
1010
Synchronization
Buffer szinkronizáció / 6
TAB
Synchronization table
SELECT * FROM TAB
WHERE FIELD = 'Y'.
Server 2
Buffer
Server 1
Buffer
TAB TAB
1111
1212
Input ellenőrzések
• Fix értékek
• Értéktábla
• Idegen kulcs
• Ellenőrző mező
• Idegen kulcs tábla / ellenőrző tábla
• Idegen kulcs szemantikus tuljadonságai
• Szöveg tábla
Fix értékekFixed Values
MANDT CARRID CONNID FLDATE BOOKID ......... CLASS ..........
401 AA 017 13.06.2000 00000034 ........ C ..........401 LH 400 25.07.2000 00000003 ........ Y ..........401 UA 941 14.08.2000 00000006 ........ F ..........
Tabelle SBOOK
Flight class
Class Short description
C Business ClassY Economy ClassF First Class
Érték tábla
Table SCARR
Create Foreign Key
Foreign key does not exist.
xxxx a proposal with value table SCARR
as check table?
Yes No Terminate
DOMAIN S_CARR_IDDOMAIN S_CARR_ID
Value table SCARRValue table SCARR
MANDT CARRID CARRNAME CURRCODE
401 AA American Airlines USD401 BA British Airways GBP401
LHLufthansa DEM
410 UA United Airlines USD
Adatrekord beszúrása
Database table SCOUNTER(sales counter)
CARRID (Carrier)
CONNID (Connection)
FLDATE (Date of flight)
COUNTER (Counter)
CUSTOMID (Customer)
Can this flight
be booked at
sales counter 8 ?
Entries to fields of table SBOOK(flight booking):
MANDT CARRID COUNTNUM
00000001
00000001
00000002
00000003
00000004
00000001
00000002
00000003
00000004
00000005
00000006
00000007
00000008
00000001
AA
BA
BA
BA
BA
LH
LH
LH
LH
LH
LH
LH
LH
UA
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
ACE
BER
LCY
LHR
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
HAM
AIRPORTAAAA
00170017
0000000800000008
0000014800000148
25.07.200025.07.2000
Idegen kulcs ellenőrzés
Database table SCOUNTER
MANDT CARRID COUNTNUM
00000001
00000001
00000002
00000003
00000004
00000001
00000002
00000003
00000004
00000005
00000006
00000007
00000008
00000001
AA
BA
BA
BA
BA
LH
LH
LH
LH
LH
LH
LH
LH
UA
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
ACE
BER
LCY
LHR
BER
DEN
FRA
LCY
LGW
LHR
MUC
RTM
HAM
AIRPORT CARRID (Carrier)
CONNID (Connection)
FLDATE (Date of flight)
COUNTER (Counter)
CUSTOMID (Customer)
Entries to fields of table SBOOK:
Insertion not allowed!Insertion not allowed!
Effect of the foreign key definition:Effect of the foreign key definition:
A data record with the contents:A data record with the contents:
MANDT = '001', CARRID = 'AA', MANDT = '001', CARRID = 'AA',
COUNTNUM = '000000009' does notCOUNTNUM = '000000009' does not
exist in table SCOUNTER.exist in table SCOUNTER.
AAAA
00170017
0000014800000148
25.07.200025.07.2000
000000008000000008
Idegen kulcs/ellenőrző mezők
Key fields
MANDT CARRID COUNTNUM AIRPORT
Foreign key table SBOOK
MANDT CARRID CONNID FLDATE CUSTOMID CANCELED
Foreign key fields
Check field
... COUNTER ...
Check table SCOUNTER
Adatkonzisztencia idegen kulcssal
MANDT CARRID CONNID ...
800
800
800
800
AA
AA
Rome
Rome
0017
0064
0555
0788
MANDT CARRID ...
800
800
800
800
AA
AC
AF
Rome
SCARR: Check table = ref. obj. SPFLI: Foreign key table = dep. obj.
SPFLI-CARRIDSPFLI-MANDT
Carrier
Flight number
Detail
maint.
AB
0020
Check field
Foreign key fields
STOPSTOP
Idegen kulcs definíciók
Key fields
Table SPFLI
MANDT ......Departure
airport
with check table:SAIRPORT
Table SAIRPORT
MANDT ......Airport
Domain S_AIRPIDDomain S_AIRPID
Value table SAIRPORTValue table SAIRPORT
Data element S_AIRPORTData element S_AIRPORT Data element S_FROMAIRPData element S_FROMAIRP
Foreign key relationship to the check field Departure Airport
Ellenőrző tábla és érték tábla
Table SBUSPART
MANDT BUSPARTNUM ...
Domain S_Domain S_BUSPANUMBUSPANUM
Value table SBUSPARTValue table SBUSPART
MANDT AGENCYNUM ...
Table STRAVELAG
Foreign key table SBOOK
MANDT CARRID CANCELED... AGENCYNUM ...
Szemantikus tulajdonságok
1:C
1:N1:1
1:CN
Cardinality
C
C
C
C
F
F
F
F
Szövegtábla
Text table SMEALT
MEAL-
NUMBERMANDT CARRID LANGUAGE TEXT
Table SMEAL
MANDT CARRID MEAL-
TYPE
MEAL-
NUMBER
Key fieldsKey fields
Foreign Key Relationship with Check Table SMEALType of foreign key fields: key fields of a text table
Dictionary objektumok függőségei
• ABAP Dictionary objektumok aktiválása
• Függő objektunok kezelése
• Where-used lista
• Repository információs rendszer
Aktív és inaktív verziók
Active version Inactive version
Active version
Active version
Field 1 Field 2 Field 3 Field 1 Field 2 Field 3 Field 4
Field 1 Field 2 Field 3 Field 4
Activate
Add Field 4 in the ABAP Dictionary
Field 2 Field 3Field 1
Futásidő objektumok
StructureInformation about
the structure
Field information
Runtime object
of the structure
Data elements
Field 2 Field 3Field 1
ABAP
Interpreter
DataData
element 1element 1DataData
element 2element 2DataData
element 3element 3
Domain 1Domain 1 Domain 2Domain 2 Domain 3Domain 3
Függő objektumok kezelése
Structure 3Table 1Structure 2Structure 1
Table 2
includes
DomainDomain
Data element 1Data element 1 Data element 2Data element 2 Data element 3Data element 3
Where-used listaUse
Where-used lists
Program 1 Program 2
Structure 3Table 1Structure 2Structure 1
DomainDomain
Table 2
Data element 1Data element 1 Data element 2Data element 2 Data element 3Data element 3
Repository információs rendszer
Show all objects of type X
with attribute Y
Show all objects
of type X that
were changed by user Y
at time DDMMYYYY
Show all objects of type X
that use
object Y
Show all table fields
with check table X
Information aboutInformation about
relationshipsrelationships
between tablesbetween tables Proof of changeProof of change
Where-used listWhere-used listSearch by attributeSearch by attribute
ABAPABAPDictionaryDictionary
? ?
? ?
Változtatások táblákban
• Adatbázis táblák változtatása
• Struktúra változtatások hatása
• Tábla konverzió
• Lehetséges konverziós probémák
• Append struktúrák
Változtatások táblákban
ABAP Dictionary
Active versioninactive version
Field 1 Field 2 Field 3
Field 2 Field 3Field 1 Field 4
Field 2 Field 3Field 1
Database
Struktúra változtatásának módja
Field 1 Field 2 Field 3
Active version
Inactive versionDelete, create again
or
Change catalog for
the DB (ALTER TABLE)
or
Convert the table
Field 2 Field 3Field 1
Field 2 Field 3Field 1 Field 4
Does the table contain data?
What database
system is used?
What change was made?
Konverziós folyamat /1
TAB ~ 0
TAB ~ A11
Field 1NUMC, 6
Field 2CHAR, 8
Field 3CHAR, 60
000100001200003000
1111A000222B100030B20
Text1...Text2 ...Text3 ...
TAB
Active version of TAB
Field 2
CHAR, 8
Field 3
CHAR, 60
Field 1
NUMC,6
Inactive version of TAB
Field 2
CHAR, 8
Field 1
NUMC,6
Field 3
CHAR, 30
Konverziós folyamat /2
QCMTAB
Rename TAB to
QCMTAB
Delete
indexes
Field 1NUMC, 6
Field 2CHAR, 8
Field 3CHAR, 60
1111A000222B100030B20
Text1...Text2 ...Text3 ...
TAB is locked
TAB ~ A11
TAB ~ 0Field 1
NUMC, 6Field 2
CHAR, 8Field 3
CHAR, 60
000100001200003000
1111A000222B100030B20
Text1...Text2 ...Text3 ...
22
Active version of TAB
Field 2
CHAR, 8
Field 3
CHAR, 60
Field 1
NUMC,6
Inactive version of TAB
Field 2
CHAR, 8
Field 1
NUMC,6
TAB locked11
TAB
Field 3
CHAR, 30
000100001200003000
Konverziós folyamat /3
Activate in the
ABAP Dictionary
Field 2CHAR, 8
Field 1NUMC, 6
Field 2CHAR, 8
Field 3CHAR, 60
000100001200003000
1111A000222B100030B20
Text1...Text2 ...Text3 ...
QCMTAB
QCM8TAB
Field 1NUMC, 6
Field 3CHAR, 30
33
Active version of TAB
Field 2
CHAR, 8
Field 3
CHAR, 60
Field 1
NUMC,6
Inactive version of TAB
33
TAB is created in the DB with
the name QCM8TAB
Field 2
CHAR, 8
Field 1
NUMC,6
Field 3
CHAR, 30
TAB locked
TAB ~ 0
Konverziós folyamat /4
Data is loaded back into QCM8TAB
44
QCMTAB
Field 1NUMC, 6
Field 2CHAR, 8
Field 3CHAR, 60
000100001200003000
1111A000222B100030B20
Text1...Text2 ...Text3 ...
Field 1NUMC, 6
Field 2CHAR, 8
Field 3CHAR, 30
000100001200003000
1111A000222B100030B20
Text1...Text2 ...Text3 ...
QCM8TAB
Active version of TAB
Field 2
CHAR, 8
Field 3
CHAR, 30
Field 1
NUMC,6
TAB locked
TAB ~ 0
Konverziós folyamat /5
Delete lock
77
Delete table QCMTAB
Field 1NUMC, 6
Field 2CHAR, 8
Field 3CHAR, 60
000100001200003000
1111A000222B100030B20
Text1...Text2 ...Text3 ...
QCMTAB
66Field 1
NUMC, 6Field 2
CHAR, 8Field 3
CHAR, 30
000100001200003000
1111A000222B100030B20
Text1...Text2 ...Text3 ...
TAB ~ 0
TAB ~ A11
QCM8 TAB
Rename table and
create indexes
55
Active version of TAB
Field 2
CHAR, 8
Field 1
NUMC,6
Field 3
CHAR, 30TAB locked
Lehetséges konverziós problémák
Tablespace overflow
Data loss if key is reduced in size
Invalid change of type
Megszakadt konverzió folytatása
What you should do
Syslog
Object log
Dumps
What you should not do
APPEND struktúrák /1
Field 1 Field 2 Field 3 Field A Field B
Table
Field 2 Field 3Field 1
Append structure
Field A Field
B
APPEND struktúrák /2
New SAP version is
imported
Field 1 Field 2 Field 3 Field A Field B
Append structure
Field A Field B
Table
Field 2 Field 3Field 1
Field 2 Field 3Field 1 Field 4
APPEND struktúrák /3
Append the field
on the database
Table
Activate
Field 1 Field 2 Field 3 Field A Field B Field4
Append structure
Field A Field B
Field 2 Field 3Field 1 Field 4
Nézetek
• Nézetek alkalmazása
• Nézet létrehozása:– Join, projekció, szelekció
• Join feltételek és idegen kulcsok
• Adatszelekció nézetekkel
• Adatbázis nézetek
• Karbantartási nézetek
• Belső és külső join
Nézetek alkalmazása
F3F2F1F4 F5
F6 F7 F8
Table 3Table 2
Table 1
View on the tables
View on data
that is
distributed on
more than one
table
F1 F2 F3 F5 F8
Nézet struktúrája
Table
TABA
Table
TABB1 1
12
2
2
Text 1 Text 3
Text 4
Text 5
Text 2
Text 6
A
A
B
B
Field 1 Field 2 Field 3 Field 4 Field 5
Field 1 Field 2 Field 3 Field 4 Field 5
1 Text 1
1 Text 1
1 Text 1
1 Text 1
2 Text 2
2 Text 2
2 Text 2
2 Text 2
1
1
2
2
Text 3
Text 4
Text 5
Text 6
A
A
B
B
1
1
2
2
Text 3
Text 4
Text 5
Text 6
A
A
B
B
Cross-product of
tables TABA and
TABB
Nézet struktúrája – Join feltétel
Join condition: TABA - Field 1 = TABB - Field 3
Field 1 Field 2 Field 3 Field 4 Field 5
1 Text 1
1 Text 1
1 Text 1
1 Text 1
2 Text 2
2 Text 2
2 Text 2
2 Text 2
1
1
2
2
Text 3
Text 4
Text 5
Text 6
A
A
B
B
1
1
2
2
Text 3
Text 4
Text 5
Text 6
A
A
B
B
Reduction of
the cross-
product
Nézet struktúrája – Mező szelekció
Field 1 Field 2 Field 4 Field 5
1 Text 1
1 Text 1
2 Text 2
2 Text 2
Text 3
Text 4
A
B
Text 5
Text 6
A
B
Field 1 Field 2 Field 5
1 Text 1
1 Text 1
2 Text 2
2 Text 2
Text 3
Text 4
Text 5
Text 6
Projection
Nézet struktúrája – Szelekciós feltétel
Selection condition:TABB - Field 4 = ‘A’.
Field 1 Field 2 Field 5
1 Text 1
1 Text 1
2 Text 2
2 Text 2
Text 3
Text 4
Text 5
Text 6
Field 1 Field 2 Field 5
1 Text 1
1 Text 1
2 Text 2
2 Text 2
Text 3
Text 4
Text 5
Text 6
Field 4
A
B
A
B
Táblák nézethez kapcsolása
MANDT CARRID CONNID FLDATE BOOKID CUSTOMID ... SBOOK
MANDT CARRID CONNID CITYFROM CITYTO SPFLI...... ...
001
001
SCUSTOMMANDT ID CITYNAME ...
122356 Smith New York001 ...
122356
122356
...
...
001
001
New York
TokyoBerlin
BerlinAA
AA
LH
LH
48
324
324
48
...
...
...
...
3689
3690
...
...
...
...
Nézet struktúrája
MANDT ID NAME CITY CARRID CONNID FLDATE BOOKID CITYFROM CITYTO
001
001
122356 Smith New York AA 48 3689 New York Berlin
122356 Smith New York LH 324 3690 Berlin Tokyo
View SCUS_BOOK for customer bookings
4.9.1999
9.9.1999
Adatszelekció nézettel
REPORT CUSBOOK1.
PARAMETERS: CUSTOMID LIKE SBOOK-CUSTOMID.
DATA: BOOKINGS TYPE SCUS_BOOK.
WRITE: / ‘Existing bookings for customer’, CUSTOMID, ‘:’.
SELECT * FROM SCUS_BOOK INTO BOOKINGS
WHERE CUSTOMID = CUSTOMID.
WRITE: / ‘CUSTOMER’, BOOKINGS-NAME, ‘booked for’,
BOOKINGS-CARRID,BOOKINGS-CONNID, ‘from’,BOOKINGS-CITYFROM,
‘to’,BOOKINGS-CITYTO, ‘on’,BOOKINGS-FLDATE.
ENDSELECT.
IF SY-SUBRC <> 0.
WRITE: / ‘No bookings exist’.
ENDIF.
Adatbázis nézetek
F6 F7 F8
Table 3
F4 F5
Table 2
F3F2F1
Table 1
View definition in the ABAP Dictionary
View definition in
the database
Is created in the DB
during activation
ABAP program
F1 F2 F3 F5 F8
F1 F2 F3 F5 F8
Database interface
Include adatbázis nézetben
F 8F 7
TABBTABB
included inincluded in
viewview
Database view on TABA, TABB and TABC
TABBTABA TABC
F 1 F 3 F 4 F 5 F 6F 4 F 5 F 6 F 8
F 2 F 3F 1 F 5 F 6F 4
Karbantartási nézetek
F6 F7 F8
Table 3
F3F2F1
Table 1Table 2
F4 F5
Maintenance
view on the
tablesData exchange with
the maintenance view
Foreign key Foreign key
F1 F2 F3 F5 F8
Application object
Belső és külső join
What is displayed with the view?
Inner join Outer join
Table TABA Table TABB
Join condition
Field 1 Field 2 Field 4
A Text 1B Text 2
Text 3Text 4
Field 1 Field 2 Field 4
A Text 1B Text 2
Text 3Text 4
C Text 5
A
B
Text 1
Text 2
Field 1 Field 2
C Text 5
A
B
Text 3
Text 4
Field 3 Field 4
Keresési segítségek
• Beviteli segítség az R/3 rendszerben
• Keresési segítség objektum– Szelekciós módszer
– Dialógus viselkedés
– Interfész
• Mezőhöz kapcsolás
• Gyűjtő és elemi keresési segítség
• Append keresési segítség
Beviteli segítség
Carrier
Flight number
. . .
Maintenance of flights
LH
No
.
Depart. city Arrival city
Carrier
0400 Frankfurt New York
0402 Frankfurt New York
LH
2402 Frankfurt Berlin
... ... ...
F4
Keresési segítség követelmények
Determine
the values
Dialog with
the user
Take context into consideration Return values
Keresési segítség objektum
Search help
Selection
method
Dialog behavior
Interface
Szelekciós módszer
SPFLI
SELECT * FROM SPFLI
WHERE CARRID = 'LH'.
Carrier
Flight number
. . .
Maintenance of flights
LH
F4
Dialógus leírása
Carrier
Connection number
Departure city
Arrival city
Limit display to 500
0*
LH
No limit
No
.
Depart. city Arrival city
Carrier
0400 Frankfurt New York
0402 Frankfurt New York
LH
2402 Frankfurt Berlin
... ... ...
F4
=
[*]
Keresési segítség interfésze
No
.
Depart. city Arrival city
Carrier
0400 Frankfurt New York
0402 Frankfurt New York
LH
Carrier
Flight number
. . .
0*
LH
Import
and export
Export
F4
F4
Keresési segítség használata
Search field
Field 1
Input template
Field 3
Table/structure
Field 1 Field 3Search field ...
Definitions in the
Screen Painter
Link
in DDIC
Internal behavior
Interface
F4
Search help
Keresési segítség csatolása
Table/structure
MANDT Field 1 Field 3Search field ...
Search help
Check table
MANDT Key1 Key 2 Data part
Internal behavior
Interface
Data element
Beviteli segítség áttekintés
does not exist
exists
PROCESS ON
VALUE-REQUEST
Input help from screen
Check of the
flow logic
FIELD … SELECT
FIELD … VALUES
Search help for
screen field
Search help for field
Search help for
data element
Search help
for check table
Fixed values
Time or
calendar help
Check table with
text table
Key values of
check table
Check table help
redirected
Beviteli segítség performanciája
Carrier
Flight number
. . .
Maintenance of flights
LH
F4
Alternatív keresési útvonalak
What was the
booking number
for my flight
to New York?
What bookings were
made in our travel
agency?
Gyűjtő és elemi keresési segítség
Included search helps
Collective search help
Internal behavior
Interface
InterfaceInterface
Internal behavior
APPEND keresési segítségek
Included search helps
. . .
(customer) appendsearch help
Included search helps
. . .
(SAP) collective search help
appends
Összefoglalás
• Táblák létrehozása
• Tábla hozzáférések performanciája
• Beviteli ellenőrzések
• Dictionary objektumok függőségei
• Tábla módosítások
• Nézetek
• Keresési segítségek