Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
BC430_EN_Col62_FV_Part_A4_-_ABAP_Dictionary.pdf
Скачиваний:
203
Добавлен:
21.05.2015
Размер:
21.37 Mб
Скачать

BC430

Lesson: Consistency Through Input Checks

b)

Assign the data element S_AGNCYNUM to your new field

 

ZEMPLOY##-Agency.

 

 

 

c)

Position the cursor on the field Agency and have the system make a

 

proposal for the foreign key definition.

 

d)

Control the proposal: The check table is SBUSPART. This check table

 

is not correct since it contains all the business partners of carriers and

 

not just agencies.

 

 

 

e)

The correct check table is STRAVELAG, which it contains the agencies

 

the carriers work with.

 

 

 

f)

You can improve understanding by looking at the definition of table

 

STRAVELAG in a second session. Field AGENCYNUM has a foreign

 

key with check table SBUSPART. This means that table STRAVELAG

 

is a subset of table SBUSPART. In the foreign key definition for

 

ZEMPLOY##-Agency, overwrite entry SBUSBART in the input field

 

Check table with STRAVELAG.

 

 

g)

Select Copy. The system recognizes the change in the check table

 

and suggests that it create a proposal. Accept this offer and select the

 

proposal. The following fields must be assigned:

 

Check table STRAVELAG

 

 

 

 

 

 

 

 

 

CkTabFld

 

For. key table

For. key fld

 

MANDT

 

ZEMPLOY##

Client

 

AGENCYNUM

 

ZEMPLOY##

Agency

h)

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

 

i)

Select Copy.

 

 

 

j)

Now activate the table.

 

 

 

k)

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

→ Table Content → Create entries. Verify your foreign key using the F4 help.

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

123

Unit 4: Input Checks

BC430

Task 4:

Extend the ZDEPMENT## table by one field.

Each department of an airline has a head of department. The assignment between the department and the head of the department should be mapped in the flight model.

1.Enhance table ZDEPMENT## with the Dephead field.

Note: In our model, the personnel number identifies a person. Therefore, the new field to be added to table ZDEPMENT## must contain personnel numbers. The field should also refer to the domain for personnel numbers.

Since the person to be managed in this case has a special role, you should create a new data element and not use the one already created for the personnel number.

Continued on next page

124

© 2007 SAP AG. All rights reserved.

2006/Q2

BC430

Lesson: Consistency Through Input Checks

Define a suitable foreign key for this field.

Note: Use the two-step domain concept.

a)Go to change mode in the maintenance screen for table ZDEPMENT##. Select the Fields tab page.

b)Choose New rows.

c)Enter the new field DepHead directly following the existing fields by entering a suitable field name in the first column and entering a name for the data element to be created in column Field type.

d)Save the table definition.

e)Select the name of the new data element to be created. Confirm that you want to create a data element.

f)Enter a short text for the data element. Enter the domain name that you already created for the personnel number in field Domain.

g)Select page Field label and enter the corresponding text there.

h)Activate the data element. Go back to the maintenance screen for table ZDEPMENT## by choosing Back.

i)Create the foreign key for the new field in the usual manner. The check table is table ZEMPLOY##.

Note: If you stored this table as a value table for the domain for the personnel number, the system will make this proposal. If not, you have to enter it yourself.

j) You copy the system proposal in the field allocation of the foreign key. k) Enter a short text and determine the semantic attributes as follows:

Field

Value

Type of foreign key fields

non-key-fields /

 

candidates

 

 

Cardinality

1:C

 

 

l) Now activate the table.

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

125

Unit 4: Input Checks

BC430

Task 5:

Create a text table.

1.Create a text table ZDEPMENTT## for the ZDEPMENT## table.

Note: This makes the department code understandable for employees of the carrier in all countries.

For the field definition, use the data elements (Data type LONG) and

S_TEXT (Data type CHAR, 40)

a)Copy table ZDEPMENT## to table ZDEPMENTT##.

b)Navigate to the field maintenance screen for table ZDEPMENTT##. Delete all the fields that are not key fields. Create the following new fields:

Field

Data

Data

Meaning

 

element

type,

 

 

 

Length

 

LANGUAGE

SPRAS

LANG

Language

DESCR

S_TEXT

CHAR,

Description

 

 

40

 

Note: The ZDEPMENTT## field Language must be a key field.

Continued on next page

126

© 2007 SAP AG. All rights reserved.

2006/Q2

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]