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: 

Deletion of change documents

former_member205645
Participant
0 Kudos

Hello Gurus,

does anyone know how I can read all the object classes of the change documents for a particular business partner? Basically I have to delete the change documents for a partner. Please help

Thanks,

Ioan.

1 ACCEPTED SOLUTION

JL23
Active Contributor
0 Kudos

Whats technically possible is not always legal, you should talk to your auditors.

Change documents have their sense in giving evidence of changes made. They are usually archived together with the business object, but can be archived separately too using the archiving object CHANGEDOCU.

Archiving does only mean "deleting from production table space" but keeping it for the legal retention time in a different medium which can be accessed on demand.

9 REPLIES 9

jay_kumar8
Active Participant
0 Kudos

Hi ,

You can use the FM's CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'

and pass the change number ,object class etc to the FM  CALL FUNCTION 'CHANGEDOCUMENT_READ'

And also you can retreive from the tables also

CDHDR and CDPOS.

Regards

Raj

0 Kudos

Hi,

In addition to these if you want to delete change documents you can use the FM

CHANGEDOCUMENT_DELETE

Regards

Raj

0 Kudos

Hi,

thank you. Unfortunately I can't use the mentioned modules because the object class parameter is not optional. I only have the partner number and that is not enough for selects of the CDHDR and CDPOS. There must be a list of some kind, of the change document object classes that are related to the business partner.

Regards,

Ioan.

0 Kudos

HI,

You can use the object class parameter  = '*'.

Regards

Raj

former_member205645
Participant
0 Kudos

How can I read all the change documents for a business partner? I know there are object classes that are not BUPA and are used in business partner also.

Thankx

Ioan

thanga_prakash
Active Contributor
0 Kudos

Hello,

For deleting the change documents, you need to have the object class, without which you can't do any deletion only with the business partner.

For example if you want to delete the sales order changes for the business partner XYZ.

Sales order tables are VBAK and VBAP.  Find the sales order for the business partner XYZ.

Once you find the sales orders list, then find the Object class of the sales orders by using the table TCDOB as below.

After finding the object class, then pass this object class and objectid to CDHDR and CDPOS to find the change logs, then using the Function module  CHANGEDOCUMENT_DELETE you can delete those change documents. Refer to the SAP documentation of the function module on how to use it

JL23
Active Contributor
0 Kudos

Whats technically possible is not always legal, you should talk to your auditors.

Change documents have their sense in giving evidence of changes made. They are usually archived together with the business object, but can be archived separately too using the archiving object CHANGEDOCU.

Archiving does only mean "deleting from production table space" but keeping it for the legal retention time in a different medium which can be accessed on demand.

0 Kudos

Hi Jürgen,

thank you. Do you know if the change document objects are grouped? For example ... what are the change document objects that are being used with Business Partner?(I have already found the BUPA* ones but there are additional ones also ) Does anyone have this information?

Regards,

Ioan.

thanga_prakash
Active Contributor
0 Kudos

Hi Ioan.

If you know the tables names for the business partner you can find the objects using the tPooled Table TCDOB. Pass the table name and find the Change doc. object associated with the table.