Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Invoke an Oracle ERP request in PL/SQL (1)-submit a single request

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Transferred from:

Http://zhaisx.iteye.com/blog/803274

PROCEDURE prc_do_import_request (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,-- user ID

Resp_id = > global_resp_id,-- responsibility ID

Resp_appl_id = > global_resp_appl_id);-- apply ID

-- set printing parameters

Success: = fnd_request.set_print_options (printer = > global_printer

Style = > global_style

Copies = > global_copies)

IF NOT success THEN

RAISE custom_exception

END IF

V_start_time: = to_char (SYSDATE, 'DD-MON-YYYY HH24:MI:SS')

-- call request

V_request_id: = fnd_request.submit_request ('INV',-- Application

'INCOIN',-- Program

A description of the program

V_start_time-- start time

FALSE,-- whether to submit as a child request. If the request is called by another request, set it to TRUE, otherwise it is FALSE.

Prm_org,-- Custom Parameter 1: organization

'1percent,-- Custom parameter 2:

'1percent,-- Custom parameter 3:

'1percent,-- Custom parameter 4:

'1percent,-- Custom parameter 5:

'1percent,-- Custom parameter 6:

'1percent,-- Custom parameter 7:

Chr (0);-- end identification

IF v_request_id = 0 THEN

RAISE custom_exception

ELSE

COMMIT

END IF

-- waiting

V_request_flag: = fnd_concurrent.wait_for_request (request_id = > the returned request ID

INTERVAL = > 5,-time difference of repeated detection

Max_wait = > 0,-- longest waiting time. 0 means waiting all the time.

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_request

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report