Файл: BC430_EN_Col62_FV_Part_A4_-_ABAP_Dictionary.pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 03.04.2021

Просмотров: 2316

Скачиваний: 40

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.
background image

Unit 4: Input Checks

BC430

Table

Field

ZDEPMENT##

Client
Airline

ZFLCREW##

Employee number

1.

Create foreign key ZEMPLOY##-Client as follows:

a)

Place the cursor on the

Client

field in ZEMPLOY##. Choose

Goto

Foreign key

.

Since you are using domain CLIENT for the

Client

field in

ZEMPLOY##, the system proposes value table T000 as check table.

b)

Have the system make a proposal for the foreign key definition. Check
the proposal. The following fields must be assigned:

Check table T000

CkTabFld

For. key table

For. key fld

MANDT

ZEMPLOY##

Client

c)

Enter a short text and define the semantic attributes as follows:

Field

Value

Type of foreign key fields

Key fields /

candidates

Cardinality

1:CN

d)

Save your foreign key.

Continued on next page

118

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Consistency Through Input Checks

2.

Create foreign key ZEMPLOY##-Carrier.

Note:

Since you are using domain S_CARR_ID for the

Carrier

field

in ZEMPLOY##, you can use value table SCARR for the foreign
key definition.

a)

Place the cursor on the

Carrier

field. Choose

Goto

Foreign key

.

b)

Have the system make a proposal for the foreign key definition. Check
the proposal. The following fields must be assigned:

Check table SCARR

CkTabFld

For. key table

For. key fld

MANDT

ZEMPLOY##

Client

CARRID

ZEMPLOY##

Airline

c)

Enter a short text and determine the semantic attributes as follows:

Field

Value

Type of foreign key fields

Key fields /

candidates

Cardinality

1:CN

d)

Save your foreign key.

3.

Create the foreign key ZEMPLOY##-Department code as follows:

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

119


background image

Unit 4: Input Checks

BC430

Enter the value table ZDEPMENT## in the domain for the

Department

code

field and activate the domain.

Note:

To get a proposal for the foreign key definition, you must

change the domain for the

Department code

field in ZEMPLOY##.

This is not absolutely necessary for later foreign key definitions,
but makes the definition easier.

a)

First of all, place the cursor on the

Department code

field in

ZEMPLOY##. Choose

Goto

Foreign key

.

Note:

Since you are using the domain of

ZDEPMENT##-Department code

field for the

ZEMPLOY##-Department code

field, you can use value table

ZDEPMENT## for the foreign key definition.

b)

Have the system make a proposal for the foreign key definition. Check
the proposal. The following fields must be assigned:

Check table ZDEPMENT##

CkTabFld

For. key table

For. key fld

MANDT

ZEMPLOY##

Client

CARRID

ZEMPLOY##

Airline

DEPARTMENT

ZEMPLOY##

Department code

c)

Enter a short text and determine the semantic attributes as follows:

Field

Value

Type of foreign key fields

non-key-fields /

candidates

Cardinality

1:CN

d)

Save your foreign key.

Continued on next page

120

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Consistency Through Input Checks

4.

Create the foreign key ZEMPLOY##-Currency as follows:

Note:

Since you are using domain S_CURR for field

ZEMPLOY##-Currency, you can use value table SCURX for the
foreign key definition.

a)

Place the cursor on field ZEMPLOY##-Currency. Choose

Goto

Foreign key

.

b)

Have the system make a proposal for the foreign key definition. Check
the proposal. The following fields must be assigned:

Check table SCURX

CkTabFld

For. key table

For. key fld

CURRKEY

ZEMPLOY##

Currency

c)

Enter a short text and determine the semantic attributes as follows:

Field

Value

Type of foreign key fields

non-key-fields /

candidates

Cardinality

1:CN

d)

Save your foreign key.

5.

Create the foreign key ZDEPMENT##-Client as follows.

a)

See foreign key ZEMPLOY##-Client.

Field

Value

Type of foreign key fields

Key fields /

candidates

Cardinality

1:CN

6.

Create the foreign key ZDEPMENT## Carrier as follows:

a)

See foreign key ZEMPLOY##-Carrier.

Field

Value

Type of foreign key fields

Key fields /

candidates

Cardinality

1:CN

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

121


background image

Unit 4: Input Checks

BC430

7.

Create foreign key ZFLCREW##-Employee number.

a)

Place the cursor on the

Employee number

field in ZFLCREW##.

Choose

Goto

Foreign key

.

Note:

The check table is the ZEMPLOY## table. If you have

stored this as value table in the domain for the employee
number, a corresponding proposal is created. If not, you have
to enter it yourself.

b)

Copy the system proposal for the field assignment.

c)

Enter a short text and determine the semantic attributes as follows:

Field

Value

Type of foreign key fields

Key fields /

candidates

Cardinality

1:CN

d)

Save your foreign key.

8.

Maintain the data for table ZEMPLOY## and test the effect of your foreign
key relationships.

a)

In the maintenance screen of the ZEMPLOY## table, select

Utilities

Table Content

Create entries

.

b)

Enter data and check whether your foreign key functions correctly
using the F4 help.

Task 3:

Some employees of airline carriers work in travel agencies in order to sell
flights for their companies there. Enhance table ZEMPLOY## with a field that
documents the travel agency where each employee works.

Enhance table ZEMPLOY## accordingly and define the foreign key relationship.

Hint:

The table of all travel agencies is called

STRAVELAG

.

1.

Create a new field Agency in your table ZEMPLOY##.

a)

Navigate to the field maintenance screen for table ZEMPLOY##. Insert
a new field Agency in the field list (select

New rows

).

Note:

In the maintenance screen for table STRAVELAG

you can see that the suitable data element is called
S_AGNCYNUM.

Continued on next page

122

© 2007 SAP AG. All rights reserved.

2006/Q2