on 05-19-2010 11:35 AM
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).
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
Many thanks for your reply.
I have tried this before. Doing so, as you suggest, will remove the document.
However, the reference to the document remains on the Report Management (CG50) screen. It looks like I am still able to access the document. Clicking on it will, however, result in a message saying the document has been removed. I would like to be able to remove the reference to the document on the Report Management screen (CG50) as well.
Greatfull if you can share with me how to do this.
Regards, Maarten
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.