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

objectclass for VD01 & VD02 changes

Former Member
0 Likes
847

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.

5 REPLIES 5
Read only

Former Member
0 Likes
738

Hi,

The object class for the customer master is DEBI..

THanks,

Naren

Read only

0 Likes
738

The changes to the addresses are stored with object class ADRESSE and object ID will be the ADRNR of the customer master (KNA1-ADRNR).

Read only

0 Likes
738

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'.

Read only

0 Likes
738

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.

Read only

Former Member
0 Likes
738

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