Example Analysis of calling Oracle ERP to submit request set in PL/SQL
The content of this article mainly focuses on the example analysis of calling Oracle ERP to submit a request set in PL/SQL. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
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
-- initialize settin
Fnd_global.apps_initialize (user_id = > global_user_id)
Resp_id = > global_resp_id
Resp_appl_id = > global_resp_appl_id)
-- set the request set
Success: = fnd_submit.set_request_set ('INV',' PLM_ERP_IMPORT')
IF NOT success THEN
RAISE custom_exception
END IF
-- set single request parameters
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
-- waiting
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: = 'error prompt: error importing ERP official table!' | | SQLERRM |
WHEN OTHERS THEN
Prm_appcode: =-1
Prm_appmsg: = 'error prompt: error importing ERP official table!' | | SQLERRM |
END prc_do_import_set
Thank you for your reading. I believe you have some understanding of the problem of "sample analysis of submitting request sets by calling Oracle ERP in PL/SQL". Go ahead and practice it. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!