Skip to Content

Specification deletion (CG02) with linked report (MSDS) in CG50

I want to clean-up my specification database in CG02. I have an issue with specifications linked to a report (MSDS) in CG50, since the deletion process is blocked by this linked.

How can I cancel the report link in order to be able to do delete my specification :

--> Do we need as a mandatory to previously archive the repor and if yes what is process for implementing the report archiving?

--> Is there another alternative ?

Thanks in adance for your Help.


Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Best Answer
    Posted on Jan 15, 2013 at 08:33 AM

    Hi Marc,

    I am working on a similar issue right now: I am trying to delete a lot of EHS data.

    I am not sure whether or not deleting the reports is in your scope, but you can search the reports in ESTDH by SUBID.

    Then use the report MCDOKDEL to delete the reports physically.

    I added some tables to be deleted because it disregards some EHS tables:

    LOOP AT it_data INTO ls_data.

    DELETE FROM estdj

    WHERE recnroot = ls_data-recn.

    DELETE FROM estdo

    WHERE recnroot = ls_data-recn.

    DELETE FROM estdh

    WHERE dmskey = ls_data-dmskey.

    SELECT recn FROM cvddh

    INTO TABLE lt_recn

    WHERE dmskey = ls_data-dmskey.

    LOOP AT lt_recn INTO ls_recn.

    DELETE FROM cvddp

    WHERE recnroot = ls_recn.

    DELETE FROM cvddh

    WHERE recn = ls_recn.



    For deleting substances you'll need to look into referenced and inherited data and delete dependencies as well. I think I solved it using RC1PHDEL and a recursive search. This is given in my thread

    If this is of any value for you, I am happy to support you on this.



    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 14, 2013 at 06:58 PM

    Dear Marc

    if on level of specification at least one report is "released" or "historic" you can not delete any more the specification using CG02. Other prerequisites for deletion are:

    - no linked material

    - specification is not used as reference, part of compositon or specification listing

    Therefore: by standard you can not delete the specification.

    Based on experience the same specification will have a material linke to it, it is used in compositions and specification listing and most important if a material is attached to the specification and the report is of type SDS/MSDS then it can be assumed that some report distribution took place. Now if you have a distributed SAP landspace with ALE dsitribution of EH&S data from one system to a different one this is in the top a good reason not to delete the specification. If there is a material link one can assume on the top that a GD master and a HS master exists.

    All this are reasons why the SAP standard don't allow "easily" to delete the specification. In this FORUM the topic has been discussed several time. Please check other threads as well.


    PS: to my knowledge: even if the report would be archived you can not delete the specification if you have "released" or "historic" reports. If you have only reports of type e.g. "ready" the story is different.

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks a lot Christoph for your answer. The reason why I want to delete some specifications is that there are from old entities which are not belonging to our company anymore. Now I understand I don't have an "easy" and standard solution to do so.

      Thanks and regards,