Application Development and Automation 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: 
Read only

updating cdhdr

Former Member
0 Likes
993

i want to update cdhdr.

i have old and new values of that dataelement.

scenario is i have data element as_datum (date).

new value is sy-datum and old value is from one table.

i have objectid, new and old value for as_datum.

how to update cdhdr?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
851

Please <b>DO NOT</b> use direct table updates.

CDHDR tables are updated using change document function modules. Please search the forum for "change documents" to find the correct way.

Regards,

Srihari

i want to update cdhdr.

i have old and new values of that dataelement.

scenario is i have data element as_datum (date).

new value is sy-datum and old value is from one table.

i have objectid, new and old value for as_datum.

how to update cdhdr?

5 REPLIES 5
Read only

Former Member
0 Likes
851

Syntax Diagram

MODIFY dbtab

Syntax

MODIFY target FROM source. addition add transporting field name

Effect

The MODIFY statement inserts one or several lines specified in source in the database table specified in target, or overwrites existing lines.

System fields

The MODIFY statement sets the values of the sy-subrc and sy-dbcnt system fields.

sy-subrc Meaning

0 All lines were inserted or changed.

4 At least one line could not be processed as there is already a line with the same unique name secondary index in the database table.

The MODIFY statement sets sy-dbcnt to the number of processed lines.

Note

The changes are finally transferred to the database table with the next database commit. Up to that point, they can be reversed with a database rollback.

The MODIFY statement sets a database lock until the next database commit or database rollback; incorrect usage can result in a deadlock kommen kann.

The number of rows that can be inserted into or changed in the tables of a database within a database LUW is restricted database-specifically by the fact that a database system can only manage a limited amount of locks and data in the rollback area.

Read only

0 Likes
851

the database table has been already modified with sy-datum by triggering business object event. still it is not updating cdhdr.

Read only

Former Member
0 Likes
851

hi,

use update statement. to modify cdhdr statement.

UPDATE cdhdr SET as_datum = sy-datum

WHERE objectid = give object id or record u need to modify.

regards

siva

Read only

Former Member
0 Likes
852

Please <b>DO NOT</b> use direct table updates.

CDHDR tables are updated using change document function modules. Please search the forum for "change documents" to find the correct way.

Regards,

Srihari

Read only

0 Likes
851

thanks srihari,

i think it is very help ful for my ploblem.