cancel
Showing results for 
Search instead for 
Did you mean: 

Customer changes log

Former Member
0 Kudos

Hi

We are implementing a CRM system, and need to extract customer details held in SAP.  An Abap Program has been written to extract all of the information that we need.

We anticipate that after the full extract we will need to extract those customers whose details were created or changed after the initial extract.  Transaction OV51 will display the changes to the customer.  These changes are held in tables CDHDR and CDPOS.

But I cannot find a link between the customer number KNA1-KUNNR, and CDHDR. 

Any ideas?

Regards Nigel

This discussion was first posted incorrectly in the wrong forum.  Mike Lindquist responded that CDHDR contained the Customer number in the CDHDR-OBJECTID field.  this does not hold true all of the time.

I made two changes to customer 270 (in devl) the address and the phone number.  One of those has listed the customer number in Objectid, the other has not.

Accepted Solutions (0)

Answers (3)

Answers (3)

JL23
Active Contributor
0 Kudos

the BP is the address group, it stands for business partner and is used for vendors too.

Use SE16 and press F4 at Address group to see all possible variations.

For change documents SAP does it this way in LSZA0F4:

MOVE address_group TO objectid.

  MOVE address_number TO objectid+4.

Former Member
0 Kudos

Apologies for the delay, but I have now returned from Christmas break.


So if I look at table CDHDR, I can use the UDATE and UTIME as the timestamp of the changes.  If the ObjectCLAS is DEBI  then I can get the new details from KNA1 using OBJECTID as the key for the customer.  If the ObectClas is ADDRESSE, then I need to use OBJECTID(+4) to look up the ADRC table.

JL23
Active Contributor
0 Kudos

exact

Jelena
Active Contributor
0 Kudos

You might want to start a SQL trace (ST05) and then view changes for a customer. It should show how exactly the change documents are accessed.

Also as a side note - SAP has an option to distribute master data changes via change pointers and IDocs.

JL23
Active Contributor
0 Kudos

Addresses are an extra object, a central object used cross applications. the link is via the address number field which can be found in KNA1 table

Former Member
0 Kudos

Hi

Thanks.

I can see that the CDHDR-OBJECTID does contain the KNA1-ADRNR.  It seems to be prefixed with a four character field BP__.  concatenated with the address as NUMC(10).  (don't you love the way that an address number is specified as a char(10) in KNA1!)

Is the prefix always BP__, or could this vary.  (__ represents two spaces).

bsivasankarreddy_reddy
Active Contributor
0 Kudos

hi

you can do the link KNA1-KUNNR  to CDHDR-OBJECTID     When you do this you find the changes like below

kna1-kunnr pass to as cdhdr-objectid , then comes change data like change number and all , here change number comes as table level , like one table number changes comes one change number ,

as your issue you change address and phone number, this is kna1  table so at CDHDR table level comes change number number only one , you must execute CDPOS , Here you find the two changes ,

checks below screen shots

here you enter the kunnr, change_ID as a U

                                                           Here you check to day change number 544489 , here i change two address , phone number but change number come only one that is 544489        go to CDPOS here enter the change number then display the changes

                                                                                                                                                                               here you find the for two changes adress, ph number , i think this clear for your issue                                                                                                                                                                                                                                                                                                                          regards

sankar                                      

jpfriends079
Active Contributor
0 Kudos

Agree with Jurgen comments.

Apart from that hope you are aware that any changes made to customer address in Sales Doc will not have any effect on Customer Master(KNA1). Any change in customer address will have separate address number which you can track in table ADRC. In addition to that any change made in sales doc header and item are recorded on Tables CDHDR and CDPOS, respectively.

If you like to know, how you can fetch customer address change made in transaction can be fetch, please refer my response in following existing SCN thread:

- Ship to party address details from transactions


Thanks, JP