在pl/sql中调用oracle erp提交请求集的示例分析-mile米乐体育
在pl/sql中调用oracle erp提交请求集的示例分析
这篇文章的内容主要围绕在pl/sql中调用oracle erp提交请求集的示例分析进行讲述,文章内容清晰易懂,条理清晰,非常适合新手学习,值得大家去阅读。感兴趣的朋友可以跟随小编一起阅读吧。希望大家通过这篇文章有所收获!
procedure prc_do_import_set(prm_org in number,
prm_appcode out number,
prm_appmsg out varchar2) is
custom_exception exception;
success boolean;
v_request_id number;
v_phase varchar2(30);
v_status varchar2(30);
v_dev_phase varchar2(30);
v_dev_status varchar2(30);
v_message varchar2(1000);
v_request_flag boolean;
v_start_time varchar2(30);
begin
prm_appcode := 0;
--初始化设置
fnd_global.apps_initialize(user_id => global_user_id,
resp_id => global_resp_id,
resp_appl_id => global_resp_appl_id);
--设置请求集
success := fnd_submit.set_request_set('inv', 'plm_erp_import');
if not success then
raise custom_exception;
end if;
--设置单请求参数
success := fnd_submit.submit_program('inv',
'incoin',
'stage10',
prm_org,
'1',
'1',
'1',
'1',
'1',
'1',
chr(0));
if not success then
raise custom_exception;
end if;
v_start_time := to_char(sysdate, 'dd-mon-yyyy hh24:mi:ss');
v_request_id := fnd_submit.submit_set(v_start_time, false);
if v_request_id = 0 then
raise custom_exception;
else
commit;
end if;
--等待
v_request_flag := fnd_concurrent.wait_for_request(request_id => v_request_id,
interval => 5,
max_wait => 0,
phase => v_phase,
status => v_status,
dev_phase => v_dev_phase,
dev_status => v_dev_status,
message => v_message);
if v_request_flag then
if v_dev_status = 'normal' then
null;
else
raise custom_exception;
end if;
else
raise custom_exception;
end if;
exception
when custom_exception then
prm_appcode := -1;
prm_appmsg := '错误提示:导入erp正式表出错!' || sqlerrm;
when others then
prm_appcode := -1;
prm_appmsg := '错误提示:导入erp正式表出错!' || sqlerrm;
end prc_do_import_set;
感谢你的阅读,相信你对“在pl/sql中调用oracle erp提交请求集的示例分析”这一问题有一定的了解,快去动手实践吧,如果想了解更多相关知识点,可以关注恰卡编程网网站!小编会继续为大家带来更好的文章!