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

Insertion into cdhdr & cdpos

Former Member
0 Likes
4,445

Hi All

I am inserting entries into equk & equp table.I want to maintain log history in cdhr & cdpos table when ever i insert entries in equk & equp table.

Pls let me know how to do it.

Thanks

Vamsi

1 ACCEPTED SOLUTION
Read only

JuanCarlosDelga
Contributor
0 Likes
2,331

Hi Mohan,

Tables CDHDR and CDPOS are filled using Change Document Objects (Tx. SDCO).

In your case the Change Document Object is QUOTEN.

http://wiki.scn.sap.com/wiki/display/CodeExchange/Use+of+Change+documents

Regards,

JCD

Hi All

I am inserting entries into equk & equp table.I want to maintain log history in cdhr & cdpos table when ever i insert entries in equk & equp table.

Pls let me know how to do it.

Thanks

Vamsi

4 REPLIES 4
Read only

Former Member
0 Likes
2,331

Hi ,

Table Technical Settings and Check LOG DATA CHANGES Check Box.

logging flag defines whether changes to the data records of a table should be logged.

If you have set the indicator for logging, every change (with UPDATE, DELETE) to an existing data record by a user or an application program is recorded in a log table in the database.

  • The existing logs can be displayed using the Transaction Table History (SCU3).
Read only

JuanCarlosDelga
Contributor
0 Likes
2,332

Hi Mohan,

Tables CDHDR and CDPOS are filled using Change Document Objects (Tx. SDCO).

In your case the Change Document Object is QUOTEN.

http://wiki.scn.sap.com/wiki/display/CodeExchange/Use+of+Change+documents

Regards,

JCD

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,331

How are you inserting those records, using a legitimate tool (BAPI, direct input, batch input) should already create the log history. Using wild SQL statements (...) may only trigger recording of log change of records (in DBTABLOG, display with SCU3) but no change documents...

Look thru transaction SCDO (object QUOTEN ?) to find the FM that generates the change documents (FM QUOTEN_WRITE_DOCUMENT ?) and perform some where-used search to find the standard reports that call it at save.

Regards,

Raymond

Read only

Former Member
0 Likes
2,331

Hey Mohan,

Here's below link which describes execution steps to achieve the functionality you are looking for. I have already tried it in my earlier developments and it works like breeze.

How to maintain log for custom tables (Log Maintenance in CDHDR & CDPOS tables)

Let us know if you face any issues.

PS : This one is for custom tables.

Cheers

VJ