Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

FND_REQUEST.SUBMIT_REQUEST in custom schema

Suresh SikaNov 14 2023 — edited Nov 14 2023

Hello,

We are facing issue while submitting the FND_REQUEST.SUBMIT_REQUEST in custom schema.

created Synonyms and provided EXECUTE grant for FND_REQUEST.SUBMIT_REQUEST in custom schema.

In order to work FND_REQUEST.SUBMIT_REQUEST in custom schema we need to create any direct /indirect objects in custom schema or else we need to give any grants. Please assist on this.

We are upgraded database from 12c to 19c.

Applications upgraded from 12.1.3 to 12.2.9

We used the below code in the CUSTOM schema. In the APPS schema, it's working fine.

DECLARE
lv_req_id NUMBER := 0;
l_option_return BOOLEAN;
l_user_id NUMBER;
l_resp_id NUMBER;
l_appl_id NUMBER;
errbuf varchar2(2000);

BEGIN
SELECT user_id
INTO l_user_id
FROM apps.fnd_user
WHERE user_name = 'APPSUSER';

SELECT application_id, responsibility_id
INTO l_appl_id, l_resp_id
FROM apps.fnd_responsibility_tl
WHERE responsibility_name = 'Order Management Super User - Kokusai';

DBMS_OUTPUT.PUT_LINE('User ID: '||l_user_id);
DBMS_OUTPUT.PUT_LINE('Resp ID: '||l_resp_id);
DBMS_OUTPUT.PUT_LINE('App ID: '||l_appl_id);

-- Initialize Context
--mo_global.init('S');
--mo_global.set_policy_context('S','22');
apps.FND_GLOBAL.APPS_INITIALIZE(l_user_id, l_resp_id, l_appl_id, 0);

l_option_return := apps.fnd_request.add_layout (template_appl_name => 'ONT',
template_code => 'QTTEMPDT',
template_language => 'en',
template_territory => 'US',
output_format => 'PDF'
);

lv_req_id:=
apps.FND_REQUEST.SUBMIT_REQUEST (application => 'ONT',
program => 'QTTEMPDT',
description => '',
start_time => SYSDATE,
sub_request => FALSE,
argument1 => '210181');--210181 ,231380

DBMS_OUTPUT.PUT_LINE('Request ID: '||lv_req_id);

COMMIT;
exception when others then
DBMS_OUTPUT.PUT_LINE('Error1'||SQLERRM);
END;

Comments

Post Details