ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 03.04.2021
Просмотров: 2385
Скачиваний: 41
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
element
Data
type,
Length
Meaning
LANGUAGE
SPRAS
LANG
Language
DESCR
S_TEXT
CHAR,
40
Description
Note:
The ZDEPMENTT## field
Language
must be a key
field.
Continued on next page
126
© 2007 SAP AG. All rights reserved.
2006/Q2
BC430
Lesson: Consistency Through Input Checks
2.
Define the foreign key of the
DepCode
field in the ZDEPMENTT## table.
Note:
The foreign keys for the
Client
and
Carrier
fields in the
ZDEPMENTT## table were already correctly defined by copying.
a)
First of all, place the cursor on the
Department code
field in the table
ZDEPMENTT##. Choose
Goto
→
Foreign key
.
Note:
Since you are using the domain of field
ZDEPMENT##-Department code for field
ZDEPMENTT##-Department code, 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
ZDEPMENT##
Client
CARRID
ZDEPMENT##
Airline
DEPARTMENT
ZDEPMENT##
Department code
c)
Enter a short text and determine the semantic attributes as follows:
Field
Value
Type of foreign key fields
key fields of a text
table
Cardinality
1:CN
d)
Save your foreign key.
Continued on next page
2006/Q2
© 2007 SAP AG. All rights reserved.
127