cancel
Showing results for 
Search instead for 
Did you mean: 

Delete the documents which are associated with document BOM

suresh_arumugam3
Explorer
0 Kudos

Dear All,

I need to delete the document which is associated with BOM. I deleted the document using CV12, however the deletion indicator is not displaying in table DRAW. If I go with CV02N and BAPI_DOCUMENT_DELETE to set for deletion indicator, system throws error that "You cannot set the deletion indicator (document is used in a BOM)".

Could you please let me know the path forward to delete the documents which are associated with document BOM.

Best regards,

A.Suresh

Accepted Solutions (0)

Answers (2)

Answers (2)

markus_deuter
Active Participant
0 Kudos

Hi Suresh,

there are at least three possibillities to prevent a deletion by a usage:

a) usage by object links

b) usage by a document structure   (member or header)

c) useage by production ressources & Tools (PRT)

Case a is easy to handle ... delete it.

In addition to this, keep in mind that if you are working with change management on b) or c) this will cause to addinional effects.

Example:
Document XYZ was part of a document structure from 1th January 2015 to 31th of January 2015.

This 31 days was a usage of the document. If you want to delete this document, you must set your document to totaly unused.

You have to check following tables:

DOST          (document structure)

CRVD_A     (PRT)

CRVD_B     (PRT)

To delete a document structure you can use function module 'CSAP_DOC_BOM_DELETE'

For this, we created a special report to set a document unused ...

Have fun !

Regards,

Markus    

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Suresh,

I think that the affected documents are still part of a document BOM maybe. Execute a where-used check for the document to see in which BOM the document is still used.

For deleting them the must not be used in any BOM structure anymore.

Best regards,

Christoph