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: 

change pointers "KEY" value

Former Member
0 Kudos
1,848

dear colleagues,

have you ever seen "KEY" value in field-name column in change pointers (bd52)? it is not looks like real field name for table or structure.

what does it mean?

3 REPLIES 3

former_member480923
Active Contributor
0 Kudos
422

hi

Change pointers are created in the following way:

The application program calls the change document interface for a change document object. To do this the generated function module xyz_DOCUMENT_WRITE is called. Its interface contains two parameters - the old records and the new records - for each table and structure for which change document deltas are to be determined. The change document interface creates a list of changes (table name, table key, field name, change type, old value, new value).

There are three types of changes:

Insert

With the insert change type precisely one record is written (table name, table key, field name = "KEY", change type = insert, old value = empty, new value = empty). The field values are not documented as they can be found in the database. With this change type it is important that the special field name KEY is used.

Update

With the update change type one record is written for each changed field (table name, table key, field name = <field name>, change type = update, old value = ABC, new value = DEF).

This change type has one variant:

In the definition of the change document object you can also specify that a delete record and an insert record are written rather than an update record. This is why the change type is also a key field in the CDPOS table. Two records for delete and insert can therefore be written for one table name, table key and field name.

Delete

With the delete change type precisely one record is written (same as with insert). You can also specify in the definition of the change document object that all values are saved. Then there will be one record for each field.

Hope this Helps

Anirban M.

former_member404244
Active Contributor
0 Kudos
422

HI Yury,

u r rite.it is not like real field name for table or structure.But u have to give the first field as key in BD52.It is mandatory

The purpose is for exampme i have created a ztable and i have 5 fields.

noe in the five fields i have two fields which are primary key.If u insert,delete or update the key fields will be moved to the KEY field,and we can know which record wa inserted,deleted or updated basing on the 'KEY' field information.Thats why u require the KEY field.

Example, my table ->Ztable.

fields are

1>ZFIELD1

2>ZFIELD2

3>ZFIELD3

4>ZFIELD4

5>ZFIELD5

OuT OF THE five fields ZFIELD1 AND ZFIELD2 are primary key fields.

now in BD52 U have to do like this.

object

name(scdo) table fields

name

Zobject Ztable KEY

Zobject Ztable ZFIELD1

Zobject Ztable ZFIELD2

Zobject Ztable ZFIELD3

Zobject Ztable ZFIELD4

Zobject Ztable ZFIELD5

Regards,

nagaraj