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: 

how to fetch the fields from cdhdr and cdpos table

Former Member
0 Kudos

hi experts.

i want to output the old and new values of zterm from knvv table and the username wo has made the changes .

for this i need to use cdhdr and cdpos table ,how can i connect these two tables with the existing code.

how to know the input fields for these cdhdr and cdpos table,

4 REPLIES 4

Former Member
0 Kudos

You should use object class objectid tabname and key to access the tables..

Initially you could search taking a case to trace the above values..

Then in your query you should use these values to fetch..

In VALUE_NEW & VALUE_OLD you will get the needed values..

Also for your case chngid should be U or Update..

Former Member
0 Kudos

Hi,

You can use the FM 'CHANGEDOCUMENT_READ_HEADERS'.

With the headers, you can access to the positions with a select like this :

SELECT *

FROM cdpos

INTO TABLE pi_cdpos

WHERE changenr = gi_cdhdr-changenr

AND objectclas = p_clas

AND chngind IN s_ind.

Bye.

former_member182371
Active Contributor
0 Kudos

Hi,

this blog might help you:

/people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap

Best regards.

Former Member
0 Kudos

Hi,

Check the below Thread,

Hope it help you.

Regards,

Anki Reddy