Файл: BC430_EN_Col62_FV_Part_A4_-_ABAP_Dictionary.pdf

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

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

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

Добавлен: 03.04.2021

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

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

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

BC430

Lesson: Changes to Tables

Figure 65: Possible Problems during Conversions

Since the data exists in both the original table and temporary table during
conversion, the storage requirements increase during conversion. If the tablespace
overflows when you reload the data from the temporary table, the conversion will
terminate. In this case, you must extend the tablespace and start the conversion
in the database utility again.

If you shorten the key of a table (for example, when you remove or shorten
the field length of key fields), you cannot distinguish between the new keys of
existing records of the table. When you reload the data from the temporary table,
only one of these records can be loaded back into the table. It is not possible to
say which record this will be. If you want to copy certain records, you have to
clean up the table

before

the conversion.

During a conversion, the data is copied back to the database table from the
temporary table with the ABAP statement MOVE-CORRESPONDING. Therefore,
only those type changes that can be executed with MOVE-CORRESPONDING
are allowed. All other type changes cause the conversion to be terminated when
the data is loaded back into the original table. In this case, you have to recreate the
old state prior to conversion. Using database tools, you have to delete the table,
rename the QCM table to its old name, reconstruct the runtime object (in the
database utility), set the table structure in the Dictionary back to its old state, and
then activate the table.

2006/Q2

© 2007 SAP AG. All rights reserved.

153


background image

Unit 6: Changes to Tables

BC430

Figure 66: Resuming Terminated Conversions

If a conversion terminates, the lock entry for the table set in the first step is
retained. The table can no longer be edited with the maintenance tools of the
ABAP Dictionary (Transaction SE11).

A terminated conversion can be analyzed with the database utility (Transaction
SE14) and then resumed. The database utility provides an

analysis tool

with

which you can find the cause of the error and the current state of all the tables
involved in the conversion.

You can usually find the precise reason for termination in the

object log

. If the

object log does not provide any information about the cause of the error, you have
to analyze the syslog or the short dumps.

If there is a terminated conversion, two options are displayed as pushbuttons
in the database utility:

After correcting the error, you can resume the conversion where it terminated
with the

Continue adjustment

option.

There is also the

Unlock table

option. This option only deletes the existing

lock entry for the table . You should

never

choose

Unlock table

for a

terminated conversion if the data only exists in the temporary table, for
example, if the conversion terminated in steps 3 or 4.

154

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Changes to Tables

Enhancement of SAP Standard Tables

Figure 67: Append Structures 1

Append structures permit you to append fields to a SAP standard table and
structures without having to modify the table definition.

An append structure is a structure which is assigned to exactly one table. There
can be several append structures for a table.

When a table is activated, all the active append structures for the table are found
and their fields are appended to the table. If an append structure is created or
changed, the table to which it is assigned is also activated and the changes also
take effect there when it is activated.

Like all structures, an append structure defines a type that can be used in ABAP
programs.

With Release 4.6C you can define foreign keys for fields that already exist in
the table using an append structure. Search helps can also be attached to fields
that already exist in the table.

Hint:

If you copy a transparent table in the Data Dictionary (DDIC)

to which an append structure has been added, the fields of the append
structure become normal fields in the target table.

2006/Q2

© 2007 SAP AG. All rights reserved.

155


background image

Unit 6: Changes to Tables

BC430

Figure 68: Append Structures 2

Customers create append structures in their namespace. The append structures are
thus protected against overwriting during an upgrade.

The new versions of the standard tables are imported during the upgrade. When
the standard tables are activated, the fields contained in the active append
structures are appended to the new standard tables. When append structures are
added to a table, you do not have to manually adjust the customer modifications to
the new SAP version of the table (Transaction SPDD) during the upgrade.

Since the order of the fields in the ABAP Dictionary since Release 3.0 can differ
from the order on the database, a conversion is not necessary when you add an
append structure or insert fields in an existing append structure. The structure is
adjusted when the database catalog is adjusted (ALTER TABLE). When activating
in the ABAP Dictionary, the definition of the table is changed and the new field is
appended to the database table.

156

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Changes to Tables

Figure 69: Append Structures 3

The new version of the SAP standard table is activated and the new field is
appended to the database table.

Hint:

Please note the following points about append structures:

No append structures may be created for pooled and cluster tables.

If a long field (data type LCHR or LRAW) occurs in a table, it
cannot be extended with appends structures. This is because such
long fields must always be in the last position of the field list (e.g.
they must be the last field of the table).

If you as a customer add an append structure to an SAP table, the
fields in this append structure should be in the customer namespace
for fields, that is they should begin with YY or ZZ. This prevents
name collisions with new fields inserted in the standard table by SAP.

If you as a partner have your own reserved namespace for your
developments, the fields you select in append structures should
always lie in this namespace.

2006/Q2

© 2007 SAP AG. All rights reserved.

157