exec dbms_application_info.set_client_info(<org_id>);
SELECT 'Request id: ' || request_id
, 'Trace id: ' || oracle_process_id
, 'Trace Flag: ' || req.enable_trace
, 'Trace Name: '
|| dest.VALUE
|| '/'
|| LOWER (dbnm.VALUE)
|| '_ora_'
|| oracle_process_id
|| '.trc'
, 'Prog. Name: ' || prog.user_concurrent_program_name
, 'File Name: '
|| execname.execution_file_name
|| execname.subroutine_name
, 'Status : '
|| DECODE (phase_code, 'R', 'Running')
|| '-'
|| DECODE (status_code, 'R', 'Normal')
, 'SID Serial: ' || ses.SID || ',' || ses.serial#
, 'Module : ' || ses.module
FROM fnd_concurrent_requests req
,v$session ses
,v$process proc
,v$parameter dest
,v$parameter dbnm
,fnd_concurrent_programs_vl prog
,fnd_executables execname
WHERE req.request_id = &request_id -----put your request id here
AND req.oracle_process_id = proc.spid(+)
AND proc.addr = ses.paddr(+)
AND dest.NAME = 'user_dump_dest'
AND dbnm.NAME = 'db_name'
AND req.concurrent_program_id = prog.concurrent_program_id
AND req.program_application_id = prog.application_id
--AND prog.application_id = execname.application_id -- Remove comment if multiple rows returned
AND prog.executable_id = execname.executable_id;
begin
fnd_global.apps_initialize(&user_id,&resp_id,&resp_appl_id);
end;
or use below statement in your apps routine.
SELECT fnd_profile.value (‘USER_ID’) FROM dual;
SELECT fnd_profile.value (‘RESP_ID’) FROM dual;
SELECT fnd_profile.value (‘RESP_APPL_ID’) FROM dual;
fnd_global.apps_initialize(fnd_profile.value (‘USER_ID’) ,fnd_profile.value (‘RESP_ID’),fnd_profile.value (‘RESP_APPL_ID’) );
select user_id from fnd_user where user_name = <'user_name'>;
select responsibility_id,application_id from fnd_responsibility_tl where responsibility_name = <'Your Resp Name'>
Eg: Customer_Name defined max. length as 30 chars where as query populates more than 30 characters.
FND_MESSAGE.SET_NAME('FND','ERROR');FND_MESSAGE.SET_TOKEN('MSG', 'Error Message');FND_MESSAGE.SHOW;
declare
form_id FORMMODULE;
BEGIN
IF :parameter.form_close = 'Y' THEN
form_id := FIND_FORM(NAME_IN('SYSTEM.CURRENT_FORM'));
IF NOT ID_NULL(form_id) THEN
CLOSE_FORM(form_id);
END IF;
END IF;
END;