FND_REQUEST.SUBMIT_REQUEST in R12

FND_REQUEST.SUBMIT_REQUEST is an API used to submit a concurrent program in ORACLE Applications.

Parameters:

Application : Short name of the application associated with the concurrent request to be submitted.
Program - Short name of the concurrent program (not the executable) for which the request should be submitted.
Description - Description of the request that is displayed in the Concurrent Requests form (Optional.)
Start_time - Time at which the request should start running, formatted as HH24:MI or HH24:MI:SS (Optional.)
Sub_request - Set to TRUE if the request is submitted from another request and should be treated as a sub-request.
Argument1...100 - Arguments for the concurrent request; up to 100 arguments are permitted. If submitted from Oracle Forms, you must specify all 100 arguments.

Example: Submission of Standard Order Import Program


SET SERVEROUTPUT ON ;
DECLARE
v_request_id NUMBER DEFAULT 0 ;
--Order Import Parameters
p_operating_unit VARCHAR2 ( 20 ) := NULL ;
p_order_source VARCHAR2 ( 20 ) := 'XYZ' ;
p_orig_sys_document_ref VARCHAR2 ( 20 ) := NULL ;
p_operation_code VARCHAR2 ( 20 ) := NULL ;
p_validate_only VARCHAR2 ( 20 ) := 'N' ;
p_debug_level VARCHAR2 ( 20 ) := '1' ;
p_num_instances VARCHAR2 ( 20 ) := '4' ;
p_sold_to_org_id VARCHAR2 ( 20 ) := NULL ;
p_sold_to_org VARCHAR2 ( 20 ) := NULL ;
p_change_sequence VARCHAR2 ( 20 ) := NULL ;
p_perf_param VARCHAR2 ( 20 ) := 'Y' ;
p_rtrim_data VARCHAR2 ( 20 ) := 'N' ;
p_pro_ord_with_null_flag VARCHAR2 ( 20 ) := 'Y' ;
p_default_org_id VARCHAR2 ( 20 ) := '83' ;
p_validate_desc_flex VARCHAR2 ( 20 ) := 'N' ;

-- End of Parameters -----

v_context varchar2 ( 100 );


FUNCTION set_context ( i_user_name IN VARCHAR2
, i_resp_name IN VARCHAR2
, i_org_id IN NUMBER )
RETURNVARCHAR2
IS
/* Inorder to reduce the content of the post I moved the implementation part of this function to another post and it is available here */
END set_context ;


BEGIN
-- Setting the context ----
v_context := set_context ( '&V_USER_NAME' , '&V_RESPONSIBILITY' , 82 );
IF v_context = 'F'
THEN
DBMS_OUTPUT . PUT_LINE ( 'Error while setting the context' );
ENDIF ;

DBMS_OUTPUT . PUT_LINE ( 'Submit Order Import Concurrent Program' );

v_request_id := FND_REQUEST . SUBMIT_REQUEST (
application => 'ONT'
, program => 'OEOIMP'
, description => 'Order Import'
, start_time => SYSDATE
, sub_request => NULL
, argument1 => p_operating_unit
, argument2 => p_order_source
, argument3 => p_orig_sys_document_ref
, argument4 => p_operation_code
, argument5 => p_validate_only
, argument6 => p_debug_level
, argument7 => p_num_instances
, argument8 => p_sold_to_org_id
, argument9 => p_sold_to_org
, argument10 => p_change_sequence
, argument11 => p_perf_param
, argument12 => p_rtrim_data
, argument13 => p_pro_ord_with_null_flag
, argument14 => p_default_org_id
, argument15 => p_validate_desc_flex
);

COMMIT ;

DBMS_OUTPUT . PUT_LINE ( 'Request_id: ' ||v_request_id );

EXCEPTIONWHENOTHERSTHEN
DBMS_OUTPUT . PUT_LINE (SQLCODE || ' Error :' || SQLERRM );
END ;


### 关于 `FND_MESSAGE.SET_NAME` 的用法 在 Oracle E-Business Suite 中,`FND_MESSAGE.SET_NAME` 是一种用于设置消息名称的过程。它允许开发者通过指定的消息名称来加载预定义的消息文件中的特定消息[^1]。 以下是该过程的一个典型用法: #### 参数说明 - **message_name**: 这是一个字符串参数,表示要使用的消息的唯一标识符。此标识符通常对应于已注册到系统的某个消息文件中的条目。 #### 使用示例 下面展示了一个简单的 PL/SQL 块,演示如何调用 `FND_MESSAGE.SET_NAME` 来设定一条消息并显示出来: ```plsql BEGIN -- 设置消息名 FND_MESSAGE.SET_NAME('XXCUSTOM', 'MSG_INVALID_ENTRY'); -- 将消息文本赋给变量 fnd_message.set_token('TOKEN_VALUE', 'Invalid Entry Detected.'); -- 显示消息 raise_application_error(-20001, fnd_message.get); END; ``` 在这个例子中,“XXCUSTOM”代表应用短名而“MSG_INVALID_ENTRY”则是具体的消息键。 如果遇到与之相关的错误,则可能是因为以下原因: - 提供的应用程序短名或者消息键不匹配任何现有的记录。 - 数据库对象权限不足导致无法访问某些表或视图。 - 如果存在拼写错误或其他语法问题也可能引发异常情况如 ORA 错误系列[^2]。 上述代码片段展示了基本的操作流程以及可能出现的一些常见问题及其潜在解决方案。 ### 解决方案建议 对于因数据完整性约束引起的ORA类错误(例如ORA-1400),应确保所有必填字段都已被正确定义并且具有有效值后再尝试重新执行操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值