Skip to Content
avatar image
Former Member

How to delete documents uploaded via the Report Management function

Hi,

I have a question about SAP REACh Compliance (v1.1), which is related to document uploading and removal.

I would like to know how to delete documents uploaded via the /TDAG/CPI08 transaction that can accessed from the Compliance Workbench transaction (/TDAG/CPM00). This functionality can be used to assign documents to Specification objects.

The issue that I have is not related to document uploading, but how to remove documents that have been uploaded. From the Compliance Workbench one can access the Report Management transaction (CG50) to access the documents uploaded. However, I have been unsuccessfull so-far in deleting documents from the CG50 transaction. Can anyone explain me how to do this?

Regards, Maarten

PS. I am aware that any document uploaded will be stored in the SAP DMS. As such, I am able to remove the document over there by means of flagging the document for deletion. However, the entry in the CG50 transaction remains, while the document cannot be opened (because it has been deleted offcourse).

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 19, 2010 at 11:45 AM

    Hi Maarten,

    Use BAPI_DOCUMENT_DELETE or BAPI_DOCUMENT_DELETE_DIRECT to delete the documents marked for deletion.

    Input the documents to be deleted, and execute the BAPI to permanently remove the DIR along with the original files.

    Regards,

    Pavan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Marteen:

      You might want to try c1f3_reports_delete... the other option is to check some of the EHS specific document header tables - like ESTDH, ESTDJ and ESTDO.

      I hope this helps.

      Rob

  • avatar image
    Former Member
    Jun 09, 2010 at 01:18 PM

    Hi Maarten,

    In EHS, to delete any document from DMS you have to use function module 'C1F3_REPORTS_DELETE'.

    But before using 'C1F3_REPORTS_DELETE', the 'C1F3_REPORTS_READ' have to be called first.

    Below the sample code you can try.

    DATA: ls_scenario TYPE espap_scenario_type,

    ls_addinf TYPE rcgaddinf,

    • Pass the recn in li_header

    ls_scenario = '02'.

    ls_addinf-valdat = sy-datum.

    CALL FUNCTION 'C1F3_REPORTS_READ'

    EXPORTING

    i_scenario = ls_scenario

    i_addinf = ls_addinf

    i_flg_header = 'X'

    IMPORTING

    e_flg_lockfail = lw_lf

    e_flg_error = lw_err

    e_flg_warning = lw_war

    TABLES

    x_api_header_tab = li_header

    EXCEPTIONS

    no_object_specified = 1

    parameter_error = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    CALL FUNCTION 'C1F3_REPORTS_DELETE'

    EXPORTING

    i_addinf = ls_addinf

    • I_FLG_CHECK_ONLY = ESP1_FALSE

    • I_FLG_ALE_MODE = ESP1_FALSE

    i_flg_header = 'X'

    • I_FLG_SUBJOIN = ESP1_FALSE

    IMPORTING

    e_flg_lockfail = lw_lf

    e_flg_error = lw_err

    e_flg_warning = lw_war

    TABLES

    x_api_header_tab = li_header

    • X_API_SUBJOIN_TAB =

    EXCEPTIONS

    no_object_specified = 1

    parameter_error = 2

    OTHERS = 3

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    CALL FUNCTION 'C1F3_REPORTS_SAVE_TO_DB'

    EXPORTING

    i_flg_commit = 'X'.

    .

    Regards,

    Mandeep

    Add comment
    10|10000 characters needed characters exceeded