Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new fields to a table

Former Member
0 Kudos

Hi Friends

Is it OK to add additional fields to a Z table? Will it affect the existing data?

Thanks in advance.

Nathan.

4 REPLIES 4

former_member181995
Active Contributor
0 Kudos

Yes it is possible to add new field to any ztable.

it will not affect any previous data of ztable.new field will be blank against all previous data.

but caution if you have table maintainance than you need to create again TMG by deleting previous TMG.

Amit.

Former Member
0 Kudos

U can add field(s)(nonkey) to ztable but after activation u should goto SE14 thn press edit button and in next screen set Save data radio button and press Activate and adjust database button.

Regards,

JOy.

Former Member
0 Kudos

In the maintenance screen for the table, place the cursor on the field in front of which the new field should be inserted and choose Insert line. You can append several new fields at the end of the table with New lines.

An empty line appears in which you can insert the new field. Creating Tables. describes how to add a field to a table.

Set the Init flag if the new field should be created in the database as NOT NULL.

In this case the entire is scanned during activation and the new field is filled with the initial value. This can be very time-consuming for large tables.

Key fields are always defined as NOT NULL. When a new key field is inserted, the primary index of the table is built again in the database.

Choose Activate .

It`s good to remember

If the table is a check table of a foreign key, new key fields can only be appended to the previous primary key. When the table is activated, the foreign keys concerned are defined as generic with regard to the new key fields. The foreign keys changed in this way are listed in the activation log.

Inserting a client field results in a table conversion . The data in the table is copied to all the clients listed in client table T000.

If the table is a check table of a foreign key, it is not possible to insert a client field. In this case you must first delete the existing foreign keys.

Former Member
0 Kudos

As previously said it is ok to do that, just remember to adjust the database table after adding or removing z table fields. specially if you added fields not at the end of the z table

to adjust the db table:

in se11 , enter the z table name and press enter

then select utilities -> db object -> db utility

select the process type ( direct, for instance )

and press activate and adjust table

regards.