本帖最后由 objmodel 于 2016-10-19 15:43 编辑
EBS版本:11.5.2.0
数据库版本:9i
测试脚本:
DECLARE
x_return_status VARCHAR2(30);
l_msg_dataVARCHAR2(3000);
l_msg_index NUMBER;
BEGIN
/* fnd_global.apps_initialize(6712, 53518, 201);*/
apps.fnd_global.apps_initialize(user_id=> 1918
,resp_id=> 52281
,resp_appl_id => 201);
/*dbms_application_info.set_client_info('456');*/
po_document_control_pub.control_document(p_api_version=> 1.0
,p_init_msg_list=> fnd_api.g_true
,p_commit => fnd_api.g_true
,x_return_status=> x_return_status
,p_doc_type => 'PO' -- 'PO','PA','RELEASE'
,p_doc_subtype=> 'STANDARD' --'BLANKET','STANDARD','SCHEDULED'
,p_doc_id => NULL /*295556*/
,p_doc_num
=> '116101900000003' /*NULL*/
,p_release_id => NULL
,p_release_num=> NULL
,p_doc_line_id=> NULL /*1294613*/
,p_doc_line_num => NULL
,p_doc_line_loc_id=> NULL
,p_doc_shipment_num => NULL
,p_action => 'CANCEL'
,p_action_date=> to_date('2016-10-20','YYYY-MM-DD')
,p_cancel_reason=> NULL
,p_cancel_reqs_flag => 'N'
,p_print_flag => NULL
,p_note_to_vendor => NULL);
dbms_output.put_line('x_return_status:' || x_return_status);
FOR i IN 1 .. fnd_msg_pub.count_msg LOOP
fnd_msg_pub.get(p_msg_index => i
,p_encoded => fnd_api.g_false
,p_data
=> l_msg_data
,p_msg_index_out => l_msg_index);
dbms_output.put_line(l_msg_data);
END LOOP;
END;
复制代码
报错信息:
单据控制因 [DOCMGR-CANCEL] 中的错误而失败,返回代码 = [OTHER]。
|