Cancel PO API Failed With Error "Document control failed due to error in [DOCMGR-CANCEL] with a return code of [OTHER]." (Doc ID 2032406.1)

Last updated on MAY 01, 2017

Applies to:

Oracle Purchasing - Version 12.1.3 and later
Information in this document applies to any platform.

Symptoms

Cancel PO API - po_document_control_pub.control_document() - completed with following error thrown

Document control failed due to error in [DOCMGR-CANCEL] with a return code of [OTHER]."

Reproducible Steps
++++++++++++++
Run script PoCancelApi.txt which has following content:-

DECLARE
l_return_status VARCHAR2(1);
l_agent_id number := 62;
l_resp_id number := 50975;
p_po_header_id number := 51006;
l_org_id number := 121;
BEGIN
fnd_global.apps_initialize(user_id => l_agent_id, resp_id => l_resp_id, resp_appl_id => 201);
mo_global.init('PO');
po_document_control_pub.control_document(p_api_version => 1.0
,p_init_msg_list => apps.fnd_api.g_true
,p_commit => apps.fnd_api.g_false
,x_return_status => l_return_status
,p_doc_type => 'PO'
,p_doc_subtype => 'STANDARD'
,p_doc_id => p_po_header_id
,p_doc_num => NULL
,p_release_id => NULL
,p_release_num => NULL
,p_doc_line_id => NULL
,p_doc_line_num => NULL
,p_doc_line_loc_id => NULL
,p_doc_shipment_num => NULL
,p_action => 'CANCEL'
,p_action_date => SYSDATE
,p_cancel_reason => NULL
,p_cancel_reqs_flag => 'N'
,p_print_flag => NULL
,p_note_to_vendor => NULL
,p_use_gldate => SYSDATE
,p_org_id => l_org_id);
FOR i IN 1..FND_MSG_PUB.count_msg
LOOP
DBMS_OUTPUT.put_line(FND_MSG_PUB.Get(p_msg_index => i,p_encoded => 'F'));
END LOOP;
END;


SQL> SET SERVEROUTPUT ON
SQL> spool PoCancelApi.txt

39 /
Document control failed due to error in [DOCMGR-CANCEL] with a return code of
[OTHER].

PL/SQL procedure successfully completed.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms