年sapabap培训教程40课英文mp4-adkj-25讲_第1页
年sapabap培训教程40课英文mp4-adkj-25讲_第2页
年sapabap培训教程40课英文mp4-adkj-25讲_第3页
年sapabap培训教程40课英文mp4-adkj-25讲_第4页
年sapabap培训教程40课英文mp4-adkj-25讲_第5页
已阅读5页,还剩33页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

SAP

BC400Tables

inthe

ABAP

DictionaryABAP字典中的表In

this

lesson,

you

learn

about

the

tables

in

theABAP

Dictionary本课中, 学习ABAP字典中的表LessonOverviewAfter

completing

this

lesson,

you

will

be

able

to:Create

TablesUse

the

two-level

conceptDefine

the

technical

settings

of

a

tableCreate

and

use

include

structures能够:完成本课程,创建表使用二级域概念定义表的技术设置创建并使用包含结构LessonObjectivesTablesThe

structure

of

the

objects

of

application

development

are

mapped

in

tableson

the

underlying

relational

database.The

attributes

of

these

objects

correspond

to

fields

of

thetable.应用开发对象的结构被 在底层关系数据库的表中。这些对象的属性对应这个表的字段。TablesA

table

consists

of

columns

(fields)

and

rows

(entries).

It

has

a

name

anddifferent

general

attributes,

such

as

delivery

class

and

maintenanceauthorization.A

field

has

a

unique

name

and

attributes;

for

example,

it

can

be

a

keyfield.表包含列(字段)和行(记录),表有一个名字和不同的一般属性,例如交付类和权限。字段有唯一的名字和属性,例如,可以是一个键字段TablesA

table

has

one

or

more

key

fields,

called

the

primarykey.The

values

of

these

key

fields

uniquely

identify

a

table

entry.一个表有一个或 个键字段,被称为主键。这些键字段的值惟一地指定一个行内表记录。TablesYou

mustspecify

a

reference

tablefor

fieldscontaining

a

currency

(datatypeCURR)

or ty

(datatypeQUAN).Itmustcontain

a

field(referencefield)with

the

format

for

currency

keys

(data

type

CUKY)

or

the

format

for

units(data

type

UNIT).

The

field

is

only

assigned

to

the

reference

field

atprogramruntime.

须为包含货币(数据类型

CURR)或者数量(数据类型

QUAN)的字段指定一个参照表,必须包含一个带货币格式(数据类型CUKY)或者单元格式(数据类型UNIT)的字段(参照字段)。在程序运行时,这个字段仅被分配给参照字段。TablesThe

basic

objects

for

defining

data

in

the

ABAP

Dictionary

are

tables,

dataelements

and s.

The is

used

for

the

technical

definition

of

atable

field

(for

example,

field

type

and

length)

and

the

data

element

is

used

forthe

semantic

definition

(for

example

short

description).在ABAP字典中定义数据的基本对象是表、数据元素和域,域被用于表字段的技术定义(例如字段类型和长度),数据元素被用于语义的定义(例如短描述)。TablesA describes

the

value

range

of

a

field

by

its

data

type

and

length.Thevalue

range

can

be

limited

by

specifying

fixedvalues.A

data

element

describes

the

meaning

of

a in

a

certainbusinesscontext.

The

data

element

contains

primarily

the

field

help

(F1

ation)and

the

field

labels

in

the

screen.域通过其数据类型和长度描述字段的值范围,这个值范围可以被指定的固定值限制。数据元素描述某个业务上下文中域的意思,数据元素包含主要的字段帮助(F1文档)和屏幕中字段。TablesA

field

is

not

an

independent

object,

but

it

is

table-dependent.

The

field

canonly

be

maintained

within

atable.You

can

enter

the

data

type

and

number

of

places

directly

for

a

field.

No

dataelement

is

required

in

this

case.

Instead,

the

data

type

and

number

ofplacesis

defined

by

specifying

a

direct

type.字段不是独立的对象,而是基于表的,字段只能在表中被

可以直接为一个字段键入数据类型和长度,这种情况下,不要求数据元素,而是通过指定一个直接的类型定义数据类型和长度。TablesThe

data

type

attributes

of

a

data

element

c so

be

defined

by

specifying

abuilt-in

type,

where

the

data

type

and

number

of

places

is

entereddirectly.数据元素的数据类型属性也可以通过指定一个内建的类型被定义,这里数据类型和长度被直接键入。TablesTheflight

schedule

isstored

in

table

SPFLI.

Table

fields

AIRPFROM

(departureairport)

andAIRPTO(arrival

airport)

have

thesame S_AIRPID.

Both

fieldsuse

the

same because

both

fields

contain

airport

IDs

and

therefore

havethe

sametechnical

attributes.

Theyhave

a

different

semantic

meaning,

however,and

use

different

data

elements

to this.

Field

AIRPFROM

uses

dataelement

S_FROMAIRP

and

field

AIRPTOusesdata

element

S_TOAIRP.航班时刻表 在表SPFLI中,表字段AIRPFROM(出发机场)和AIRPTO(到达机场)有相同的域S_AIRPID,两个字段都使用相同的域因为两个字段都包含机场ID,并且因此有相同的技术属性。然而,它们有不同的语义,并使用不同的数据元素来说明。字段AIRPFROM使用数据元素S_FROMAIRP,字段

AIRPTO使用数据元素S_TOAIRP。TablesA

transparent

table

is

automatically

created

on

the

database

when

it

isactivated

in

the

ABAP

Dictionary.

At

this

time,

the

database-independentdescription

of

the

table

in

the

ABAP

Dictionary

is

translated

into

thelanguageof

the

database

system

used.透明表在ABAP字典中被激活的时候,数据库表在数据库上被自动地创建,这个时候,ABAP字典中表的数据库

独立的描述被翻译成数据库系统使用的语言。TablesThe

database

table

has

the

same

name

as

the

table

in

the

ABAP

Dictionary.The

fields

also

have

the

same

name

in

both

the

database

and

the

ABAPDictionary.

The

data

types

in

the

ABAP

Dictionary

are

converted

to

thecorresponding

data

types

of

the

database

system.数据库表与ABAP字典中的表有相同的名字,在数据库和ABAP字典中,字段也有相同的名字,ABAP字典中的数据类型被转换成书库系统中对应的数据类型。TablesThe

order

of

the

fields

in

the

ABAP

Dictionary

can

differ

from

the

order

of

thefields

on

the

database.

This

permits

you

to

insert

new

fields

without

having

toconvert

the

table.

When

you

add

a

new

field,

adjust

the

order

of

the

fields

bychanging

the

database

catalog

(ALTER

TABLE).

The

new

field

is

added

to

thedatabase

table.ABAP字典中字段的顺序可以与书库上字段的顺序不同,这允许 新的字段而无需变换表。当 增加新字段的时候,通过修改数据库 调整字段顺序,新字段被添加到书库表。TablesABAP

programs

can

access

a

transparent

table

in

two

ways.

One

way

is

toaccess

the

d ontained

in

the

table

with

OPEN

SQL

(or

EXEC

SQL).

Withthe

other

method,

the

table

defines

a

structured

type

that

is

accessed

whenvariables

(or

more

complex

types)

are

defined.ABAP程序可以通过两种方式 透明表, 式是使用OP

SQL(或EXECSQL) 表中包含的数据,使用其它方法,表定义一个结构化的类型,当变量(或者更复杂的类型)定义的时候被。TablesYou

c

so

create

a

structuredtype

in

the

ABAP

Dictionary

for

whichthereis

no

corresponding

object

in

the

database.

Such

types

are

called

structures.Structures

c

so

be

used

to

define

the

types

ofvariables.

也可以在ABAP字典中创建一个在数据库中没有相应对象的结构化类型,这样的类型被称为结构,结构能被用来定义变量类型。TablesStructures

can

be

included

in

tables

or

other

structures

to

avoid

redundantstructuredefinitions.A

table

may

only

be

included

as

an

entire

table.为避免冗余结构定义,结构能够被包含在表中或者其他结构中。表只可以作为整个的表被包含。TablesA

chain

of

includes

may

only

contain

one

database

table.

The

table

inwhichyou

are

including

belongs

to

the

include

chain.

This

means

that

you

may

notinclude

a

transparent

table

in

a

transparent

table.Includes

maycontain

furtherincludes.一串包含只可以包含一个数据库表,其中包含的表属于这个包含串,这意味着,不可以在一个透明表中包含一个透明表。包含可以有进一步包含。TablesForeign

key

definitions

are

generally

imparted

from

the

include

to

theincludingtable.

The

attributes

of

the

foreign

key

definition

are

passed

from

the

include

to

the

including

table

so

that

the

foreign

key

depends

on

the

definition

in

theinclude.外键的定义通常被从被包含授权给主包含表,外键定义属性被从被包含传输到主包含表,所以外键基于包含的定义。TablesYou

must

maintain

the

technical

settings

when

you

define

a

transparenttablein

theABAPDictionary.The

technical

settings

are

used

to

individually

optimize

thestoragerequirements

and

accessing

behavior

of

database

tables.当在ABAP字典中定义透明表的时候,须 技术设置。技术设置被用来单独地优化数据库表的 需求和 行为。TablesThe

technical

settings

can

be

used

to

define

how

the

table

should

be

handledwhen

it

is

created

on

the

database,

whether

the

table

should

be

buffered

andwhether

changes

to

entries

should

be

logged.技术设置可以被用来定义当表在数据库上被创建的时候,应该如何被处理,表是否应该被缓冲,对记录的修改是否应该被记录。TablesThe

table

is

automatically

created

on

the

database

when

it

is

activated

in

theABAP

Dictionary.

The

information

required

here

about

the

storage

area

to

beselected

(tablespace)

and

the

expected

table

size

is

determined

from

thesettings

for

the

d lass

and

size

category.当表在ABAP字典中被激活的时候,被自动在书库上创建,这里关于被选中的 区信息和预期的表大小从数据类和大小分类的设置类确定。TablesThe

settings

for

buffering

define

whether

and

how

the

table

should

bebuffered.You

can

define

whether

changes

to

the

table

entries

should

be

logged.缓冲的设置定义表是否和如何被缓冲。应该定义对表记录的修改是否应该被记录。TablesParticularly

tables

that

include

transaction

d an

have

large

gaps

in

therallocated

memory

space

due

to

the

fast

growth

or

frequent

changing

of

thedatasets

(inserting

and

deleting

of

data

records).

This

fragmenting

of

the

dataon

the

hard

drive

of

the

database

server

always

leads

torepeatedperformance

problems,

which

can

not

be

removed

by

simple

measures

suchas

creating

an

index.特别地,包含交易事务数据的表,由于快速的增长或者数据集频繁的(数据记录的 和删除),会在其分配的 空间有大的间隙,这种数据库服务器硬驱动上数据的碎裂总是导致性能问题,不能通过简单的测量如创建索引被移除。TablesFragmented

indexes

can

be

defragmented

by

simply

deleting

them

andthenentering

them

again.

Here,

the

database

calculates

the

content

and

thestructure

of

the

index

again

and

creates

the

necessary

memory

space

in

onepiece

in

the

storage

medium,

where

possible.

While

the

index

is

being

newlystructured,

the

database

tables

can

still

be

used.碎裂的索引能够通过简单的删除并再次写入被除掉碎片,这里,数据库再次计算索引的内容和结构,并在介质片中创建需要的空间。当索引被重新组织的时候,数据库表依然能够被使用。TablesFragmented

tables

must

be

converted

(see

Changes

to

database

tables),

inorder

to

reduce

the

fragmentation.

The

SAP

system

creates

a

new

table

forthis.

The

data

are

transferred

to

this

table.

The

old

table

is

then

deleted

andthe

new

table

replaces

it.

If

this

table

should

unexpectedly

grow

very

quickly,this

table

should

be

checked

once

again

before

converting

the

technicalsettings

and

adjusted

if

neccessary.碎裂的表必须被转换(查看对数据库表的修改),目的为了减少碎片,

SAP系统为此创建一个新表,数据被传入这个表,旧的表然后被删除,新表替换它。如果这个表意外地快速增长,那么这个表在转换技术设置前应该再次被检查,如果需要的话进行调整。TablesIn

order

to

avoid

such

fragmentations

as

much

as

possible

from

the

start,

youselect

the

tables

according

to

size

and

data

type

in

the

technical

settings.为了从开始就尽量避免这种碎片, 依据技术设置中的大小和数据类型选择表。TablesThed lass

logically

defines

the

physical

area

of

the

database

(forORACLE

the

tablespace)

in

which

your

tableshould

be

stored.If

youchoosethed lass

correctly,

the

table

will

automatically

be

created

in

the

correctarea

on

the

database

when

it

is

activated

in

the

ABAP

Dictionary.数据类逻辑地定义表需要被

的数据库物理区域(对ORACLE表空间)。如果正确地选择数据类,那么当表在ABAP字典中被激活的时候,就在数据库上正确的区域被自动创建。TablesThe

most

important

d lasses

are

master

data,

transaction

data,organizational

data

and

system

data.Master

data

is

data

that

is

only

seldomly

modified.

An

example

of

master

datais

the

data

of

an

address

file,

for

example

the

name,

address

and

ephonenumber.最重要的数据类是主数据、交易数据、组织数据和系统数据。主数据是很少被修改的数据,主数据的一个例子是地址文件数据,例如,名字、地址和

。TablesTransaction

data

is

data

that

is

frequently

modified.

An

example

is

the

materialstock

of

a

warehouse,

which

can

change

after

each

purchase

order.Organizational

data

is

data

that

is

defined

during

customizing

when

thesystem

is

installed

and

that

is

onlyseldomly

modified

thereafter.

Thecountrykeys

are

anexample.交易数据是经常被修改的数据,例子是仓库的物料库存,每一个采购订单后都可能修改。组织数据是当系统被安装的时候,在客制化期间定义的数据,其后很少被修改。国家的键是一个例子。TablesSystem

data

is

data

that

the

SAP

System

itself

needs.

The

program

sourcesare

an

example.Furtherd lasses,

called

customer

d lasses

(USER,

USER1),areprovided

for

customers.

These

should

be

used

for

customerdevelopments.Special

storage

areas

must

be

allocated

in

the

database.系统数据是SAP系统自己需要的数据,程序源是一个例子。进一步的数据类,称为

类(USER,USER1),为客户提供,

这些应该为客户开发所使用,特殊的 区域必须在数据库中被分配。TablesThe

size

category

describes

the

expected

storage

requirements

for

the

tableon

thedatabase.An

initial

extent

is when

a

table

is

created

on

the

database.

The

sizeof

the

initial

extent

is

identical

for

all

size

categories.

If

the

table

needs

morespace

for

data

at

a

later

time,

extents

are

added.

These

additional

extentshave

a

fixed

size

that

is

determined

by

the

size

category

specified

in

the

ABAPDictionary.大小类型描述了为数据库上表预期的要求。当表在数据库上被创建的时候,初始范围被保留,这个初始范围的大小对所有大小类型都是完全相同的。如果后来需要

空间的话,范围被增加,这些附加的范围有一个固定的大小,通过ABAP字典中指定的大小类来确定。TablesYou

can

choosea

sizecategory

from0

to

4.

Every

categoryis

assigned

afixed

extent

size,

which

depends

on

the

database

systemused.Correctly

assigning

a

size

category

ensures

that

you

do

not

create

alargenumber

of

small

extents.

It

also

prevents

storage

space

from

being

wastedwhen

creating

extents

that

are

too

large.可以从

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论