‎2007 Mar 07 5:20 PM
Hi all,
I have customer number, i need to fetch latest change date of address and contact details only.
how to convert customer number into objectid of cdhdr table and what is object class to get latest change date.
‎2007 Mar 07 5:32 PM
Hi,
The object class for the customer master is DEBI..
THanks,
Naren
‎2007 Mar 07 5:36 PM
The changes to the addresses are stored with object class ADRESSE and object ID will be the ADRNR of the customer master (KNA1-ADRNR).
‎2007 Mar 07 5:44 PM
I find two more object classes 'ADRESSE3' & 'DEBI'. When these will created.
I would like to get latest change date of address and contact details only using vd01 and vd02.
one more thing how to covert customer number to object id .
my customer number would be something like '002346678' but object id details what i found in table is differant like 'BP 132546656'.
‎2007 Mar 07 5:55 PM
I am not sure which version ytou are on but it is ADRESSE in my 47 system. The object ID is the combination of your partner function (internal format) and the value of KNA1-ADRNR for that customer. So with your customer ID 002346678 go to KNA1, get the KNA1-ADRNR value, concatenate that with your partner function and then go to CDHDR and CDPOS for the changes using ADRESSE object class.
‎2007 Mar 07 5:51 PM
Hi,
Please try this.
CLEAR OBJECTID.
OBJECTID(2) = 'BP'.
OBJECTID+4 = KNA1-ADRNR.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
DATE_OF_CHANGE = CD_DATE
OBJECTCLASS = 'ADRESSE'
OBJECTID = OBJECTID
TIME_OF_CHANGE = CD_TIME
USERNAME = SY-UNAME
TABLES
I_CDHDR = ICDHDR
EXCEPTIONS
NO_POSITION_FOUND = 1
WRONG_ACCESS_TO_ARCHIVE = 2
TIME_ZONE_CONVERSION_ERROR = 3
OTHERS = 4.
Regards,
Ferry Lianto