AOL
AOL
Objective:
§ Register custom Application components.
§ Understand the security authorization features of Oracle Applications.
§ Run concurrent programs using Standard Report Submission.
§ Design and implement Key and Descriptive Flex fields.
§ Define and modify user profile options.
/*=============================================
CREATE CONCURRENT PROGRAM EXECUTABLE FROM BACKEND
==============================================*/
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_SHORT_NAME LIKE 'XXCUST'
DECLARE
v_executable VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.executable (executable => 'XXAA Ar Aging Report',
application => 'XXCUST Custom Application',
short_name => 'XXAA_AR_AGING',
execution_method => 'Oracle Reports',
execution_file_name => 'XXAA_AR_AGING'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'succeefully created executable name is '||
v_executable );
END;
SELECT * FROM fnd_executables
WHERE execution_file_name = 'XXAA_AR_AGING'
/*=============================================
DELETE CONCURRENT PROGRAM EXECUTABLE FROM BACKEND
==============================================*/
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_program.delete_executable (executable_short_name => v_short_name,
application => 'XXCUST Custom Application'
);
COMMIT;
DBMS_OUTPUT.put_line('Concurrent Program Executable succeefully Deleted'||
v_short_name );
END;
SELECT * FROM fnd_executables_vl
WHERE execution_file_name = 'XXAA_AR_AGING'
Concurrent Program:
§ Define a concurrent program,
§ Choose an executable created, which will be executed once this concurrent
program is scheduled to run.
Output formats of a concurrent program:
HTML.
PDF.
TEXT.
PS (Post Script).
PCL (HP’s Printer Control Language).
/*=============================================
CREATE CONCURRENT PROGRAM DEFINE FROM BACKEND
==============================================*/
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
DECLARE
v_name VARCHAR2 (50) := 'XXAA Ar Aging Report';
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.REGISTER (program => v_name,
application => 'XXCUST Custom Application',
enabled => 'Y',
short_name => v_short_name,
executable_short_name => v_short_name,
executable_application => 'XXCUST Custom Application',
style => 'A4',
output_type => 'TEXT',
use_in_srs => 'Y'
);
COMMIT;
DBMS_OUTPUT.put_line ('succeefully created concurrent program '||
v_short_name );
END;
SELECT * FROM fnd_concurrent_programs_vl
WHERE concurrent_program_name='XXAA_AR_AGING'
/*=============================================
/*=============================================
DELETE CONCURRENT PROGRAM FROM BACKEND
==============================================*/
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_program.delete_program (program_short_name => v_short_name,
application => 'XXCUST Custom Application'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Concurrent Program succeefully Deleted ' ||
v_short_name );
END;
SELECT * FROM fnd_concurrent_programs_vl
WHERE concurrent_program_name='XXAA_AR_AGING'
Define Concurrent Parameters:
§ The parameters are the placeholders for the input values to a concurrent program.
§ If the execution method of a concurrent program is Oracle Reports then each
parameter is linked to the actual report parameter via the “Token” field in the
parameters window
§ For PL/SQL stored procedures these parameters are passed to the program by
position.
/*=============================================
CREATE PARAMETERS TO THE CONCURRENT PROGRAM FROM BACKEND
==============================================*/
DECLARE
v_cprogram VARCHAR2 (50) := 'XX_APPS88_HRMS';
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.parameter (program_short_name => v_cprogram,
application => 'Human Resources',
SEQUENCE => 10,
parameter => 'Employee Number',
enabled => 'Y',
value_set => '240 char',
display_size => 50,
description_size => 20,
concatenated_description_size => 20,
prompt => 'P_EMPLOYEE_NUM',
token => 'P_EMPLOYEE_NUM'
);
COMMIT;
DBMS_OUTPUT.put_line (' successfully created parameter for concurrent program
' || v_cprogram );
EXCEPTION
WHEN OTHERS
THEN DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END;
/*=============================================
DELETE PARAMETERS IN THE CONCURRENT PROGRAM FROM BACKEND
==============================================*/
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_program.DELETE_PARAMETER (program_short_name => v_short_name,
application => 'XXCUST Custom Application',
parameter => 'P_DATE'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Parameter succeefully Deleted For The Concurrent
Program ' || v_short_name );
END;
Define Request Group:
§ Note the Request group name for the responsibility, with which you want to attach
the concurrent program.
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
SELECT * FROM FND_RESPONSIBILITY_VL
WHERE 1=1
AND RESPONSIBILITY_NAME = 'Receivables, Vision Operations (USA)'
SELECT * FROM fnd_request_groups
WHERE 1=1
AND request_group_name like 'Receivables All'
/*=============================================
DELETE PARAMETERS IN THE CONCURRENT PROGRAM FROM BACKEND
==============================================*/
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_program.DELETE_PARAMETER (program_short_name => v_short_name,
application => 'XXCUST Custom Application',
parameter => 'P_DATE'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Parameter succeefully Deleted For The Concurrent
Program ' || v_short_name );
END;
Define Request Group:
§ Note the Request group name for the responsibility, with which you want to attach
the concurrent program.
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
SELECT * FROM FND_RESPONSIBILITY_VL
WHERE 1=1
AND RESPONSIBILITY_NAME = 'Receivables, Vision Operations (USA)'
SELECT * FROM fnd_request_groups
WHERE 1=1
AND request_group_name like 'Receivables All'
Define Request Group :
§ Query the request group and add your concurrent program to the group.
§ A request group is a collection of reports and concurrent programs.
§ A system administrator defines request group in order to control user access to
reports and concurrent programs.
/*=============================================
ADD CONCURRENT PROGRAM TO THE REQUEST GROUP FROM BACKEND
==============================================*/
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
SELECT * FROM FND_RESPONSIBILITY_VL
WHERE 1=1
AND RESPONSIBILITY_NAME = 'Receivables, Vision Operations (USA)'
SELECT * FROM fnd_request_groups
WHERE 1=1
AND request_group_name like 'Receivables All'
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.add_to_group (program_short_name => v_short_name,
program_application => 'XXCUST Custom Application',
request_group => 'Receivables All',
group_application => 'Receivables'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'succeefully attached concurrent program to request
group' || v_short_name );
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END;
----
>>================================================
==============<<----
SELECT fcpt.user_concurrent_program_name,
frg.request_group_name,
fcp.concurrent_program_name,
frt.responsibility_name,
fat.application_name,
fa.application_short_name,
fa.basepath
FROM fnd_request_group_units frgu,
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcpt,
fnd_request_groups frg,
fnd_executables fe,
fnd_responsibility fr,
fnd_responsibility_tl frt,
fnd_application_tl fat,
fnd_application fa
WHERE 1 = 1
AND fat.application_id = frgu.application_id
AND frgu.request_unit_id = fcp.concurrent_program_id
AND frgu.request_group_id = frg.request_group_id
AND fe.executable_id = fcp.executable_id
AND fcp.concurrent_program_id = fcpt.concurrent_program_id
AND frg.request_group_id = fr.request_group_id
AND fr.responsibility_id = frt.responsibility_id
AND fa.application_id = fat.application_id
AND fcpt.user_concurrent_program_name LIKE 'XXAA Ar Aging Report'
ORDER BY 6,4,3,2
/*=============================================
DELETE CONCURRENT PROGRAM FROM THE REQUEST GROUP FROM
BACKEND
==============================================*/
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.remove_from_group (program_short_name => v_short_name,
program_application => 'XXCUST Custom Application',
request_group => 'Receivables All',
group_application => 'Receivables'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Successfully Deleted executable name is ' ||
v_short_name );
END;
/
*==================================================
======================*/
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
DECLARE
v_name VARCHAR2 (50) := 'XXAA Ar Aging Report';
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.executable (executable => v_name,
application => 'XXCUST Custom Application',
short_name => v_short_name,
execution_method => 'Oracle Reports',
execution_file_name => v_short_name
);
COMMIT;
DBMS_OUTPUT.put_line ( 'succeefully created executable name is '||
v_short_name );
END;
SELECT * FROM fnd_executables_vl
WHERE execution_file_name = 'XXAA_AR_AGING'
---
>>>===============================================
============
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_program.delete_executable (executable_short_name => v_short_name,
application => 'XXCUST Custom Application'
);
COMMIT;
DBMS_OUTPUT.put_line('Concurrent Program Executable succeefully Deleted'||
v_short_name );
END;
SELECT * FROM fnd_executables_vl
WHERE execution_file_name = 'XXAA_AR_AGING'
/
*==================================================
======================*/
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
DECLARE
v_name VARCHAR2 (50) := 'XXAA Ar Aging Report';
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.REGISTER (program => v_name,
application => 'XXCUST Custom Application',
enabled => 'Y',
short_name => v_short_name,
executable_short_name => v_short_name,
executable_application => 'XXCUST Custom Application',
style => 'A4',
output_type => 'TEXT',
use_in_srs => 'Y'
);
COMMIT;
DBMS_OUTPUT.put_line ('succeefully created concurrent program '||
v_short_name );
END;
SELECT * FROM fnd_concurrent_programs_vl
WHERE concurrent_program_name='XXAA_AR_AGING'
---
>>>===============================================
============
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING';
BEGIN
fnd_program.delete_program (program_short_name => v_short_name,
application => 'XXCUST Custom Application'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Concurrent Program succeefully Deleted ' ||
v_short_name );
END;
SELECT * FROM fnd_concurrent_programs_vl
WHERE concurrent_program_name='XXAA_AR_AGING'
/
*==================================================
======================*/
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.parameter (program_short_name => v_short_name,
application => 'XXCUST Custom Application',
SEQUENCE => 10,
parameter => 'As Of Date',
enabled => 'Y',
value_set => '240 char',
display_size => 50,
description_size => 20,
concatenated_description_size => 20,
prompt => 'As Of Date',
token => 'P_DATE'
);
COMMIT;
DBMS_OUTPUT.put_line (' successfully created parameter for concurrent program
' || v_short_name );
EXCEPTION
WHEN OTHERS
THEN DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END;
---
>>>===============================================
============
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_program.DELETE_PARAMETER (program_short_name => v_short_name,
application => 'XXCUST Custom Application',
parameter => 'P_DATE'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Parameter succeefully Deleted For The Concurrent
Program ' || v_short_name );
END;
/
*==================================================
======================*/
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
SELECT * FROM FND_RESPONSIBILITY_VL
WHERE 1=1
AND RESPONSIBILITY_NAME = 'Receivables, Vision Operations (USA)'
SELECT * FROM fnd_request_groups
WHERE 1=1
AND request_group_name like 'Receivables All'
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.add_to_group (program_short_name => v_short_name,
program_application => 'XXCUST Custom Application',
request_group => 'Receivables All',
group_application => 'Receivables'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'succeefully attached concurrent program to request
group' || v_short_name );
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END;
SELECT fcpt.user_concurrent_program_name,
frg.request_group_name,
fcp.concurrent_program_name,
frt.responsibility_name,
fat.application_name,
fa.application_short_name,
fa.basepath
FROM fnd_request_group_units frgu,
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcpt,
fnd_request_groups frg,
fnd_executables fe,
fnd_responsibility fr,
fnd_responsibility_tl frt,
fnd_application_tl fat,
fnd_application fa
WHERE 1 = 1
AND fat.application_id = frgu.application_id
AND frgu.request_unit_id = fcp.concurrent_program_id
AND frgu.request_group_id = frg.request_group_id
AND fe.executable_id = fcp.executable_id
AND fcp.concurrent_program_id = fcpt.concurrent_program_id
AND frg.request_group_id = fr.request_group_id
AND fr.responsibility_id = frt.responsibility_id
AND fa.application_id = fat.application_id
AND fcpt.user_concurrent_program_name LIKE 'XXAA Ar Aging Report'
ORDER BY 6,4,3,2
;
---
>>>===============================================
============
DECLARE
v_short_name VARCHAR2 (50) := 'XXAA_AR_AGING'; --> Conc Program Short Name
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.remove_from_group (program_short_name => v_short_name,
program_application => 'XXCUST Custom Application',
request_group => 'Receivables All',
group_application => 'Receivables'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Successfully Deleted executable name is ' ||
v_short_name );
END;
/
*==================================================
======================*/
Concurrent Programs Assigned to a Request Group:
SELECT fcpv.concurrent_program_name short_name,
fcpv.user_concurrent_program_name conc_prog_name,
frg.request_group_name req_group_name
FROM fnd_concurrent_programs_vl fcpv,
fnd_request_groups frg,
fnd_request_group_units frgu
WHERE fcpv.concurrent_program_id = frgu.request_unit_id
AND fcpv.enabled_flag = 'Y'
AND frgu.request_group_id = frg.request_group_id
AND frg.request_group_name = '&request_group_name';
Check if the concurrent program is assigned to a given responsibility:
SELECT fcpv.concurrent_program_name short_name,
fcpv.user_concurrent_program_name conc_prog_name,
frg.request_group_name req_group_name,
frv.responsibility_name
FROM fnd_concurrent_programs_vl fcpv,
fnd_request_groups frg,
fnd_request_group_units frgu,
fnd_responsibility_vl frv
WHERE fcpv.concurrent_program_id = frgu.request_unit_id
AND fcpv.enabled_flag = 'Y'
AND frgu.request_group_id = frg.request_group_id
AND frg.request_group_id = frv.request_group_id
AND frv.responsibility_name = '&resp_name'
AND fcpv.user_concurrent_program_name = '&con_prg_name';
SRS Form:
§ Then use SRS (Standard Report Submission) form for running and monitoring your
application’s reports/concurrent programs at specific time interval.
§ This lets user specify run and print options and parameter value for reports and
concurrent programs.
§ Use fnd_file.put_line(fnd_file.log, ‘any message’) to show message in conc
program log file.
Switch Responsibility to ‘Receivables, Vision Operations (USA)’ à View à Requests à
A concurrent request proceeds through three, possibly four, life cycle stages or
phases:
ü Pending Request is waiting to be run
ü Running Request is running
ü Completed Request has finished
ü Inactive Request cannot be run.
Concurrent Programs Business Events:
In R12 for concurrent programs submission and completion has business events
associated with them
in the concurrent program definition form there is a business events tab which
displays the list of events associated
here you specify the points at which business events are enabled. The possible
points are:
Request Submitted
Request On Hold
Request Resumed
Request Running
Program Completed
Post Processing Started
Post Processing Ended
Request Completed.
But make sure you set the profile "Concurrent: Business Intelligence Integration
Enable". You will need to set "Yes" to enable Business Events from Concurrent
Processing System
Within each phase, a request’s condition or status may change. Below appears a
listing of each phase and the various states that a concurrent request can go
through.
Concurrent Request Phase and Status:
Phase: PENDING:
· Normal: Request is waiting for the next available manager.
· Standby: Program to run request is incompatible with other program(s) currently
running.
· Scheduled: Request is scheduled to start at a future time or date.
· Waiting: A child request is waiting for its Parent request to mark it ready to run.
Phase: RUNNING:
· Normal: Request is running normally.
· Paused: Parent request pauses for all its child requests to complete.
· Resuming: All requests submitted by the same parent request have completed
running. The Parent request is waiting to be restarted.
· Terminating: Running request is terminated, by selecting Terminate in the Status
field of the Request Details zone.
Phase: COMPLETED:
· Normal: Request completes normally.
· Error: Request failed to complete successfully.
· Warning: Request completes with warnings. For example, a report is generated
successfully but fails to print.
· Cancelled: Pending or Inactive request is cancelled, by selecting Cancel in the
Status field of the Request Details zone.
· Terminated: Running request is terminated, by selecting Terminate in the Status
field of the Request Details zone.
Phase: INACTIVE:
· Disabled: Program to run request is not enabled. Contact your system
administrator.
· On Hold: Pending request is placed on hold, by selecting Hold in the Status field
of the Request Details zone.
· No Manager: No manager is defined to run the request. Check with your system
administrator.
Request Set:
§ Request Sets are a method of grouping multiple reports and/or concurrent
programs by business function with common run and print options.
§ The various tasks of the request set are linked together to determine the
execution order, whether the tasks execute sequentially or in parallel.
§ Stage is a component of a request set used to group requests within the set. All
requests in a stage are run in parallel, while stages themselves are run
sequentially in the set.
§ Tasks that must operate separately are created in different stages.
§ After defining the initial stage for execution, all subsequent stages are defined
under the three completion status codes for the previous stage.
Useful FND Queries:
1. Concurrent Program Info
SELECT fcpt.user_concurrent_program_name concurrent_program,
fdfcu.column_seq_num sequence_number,
fdfcu.DEFAULT_VALUE DEFAULT_VALUE,
fdfcut.form_left_prompt prompt,
fdfcut.description description,
ffvs.flex_value_set_name,
fl.meaning,
fe.executable_name
FROM apps.fnd_concurrent_programs fcp,
apps.fnd_concurrent_programs_tl fcpt,
apps.fnd_concurrent_programs_tl fcpd,
apps.fnd_descr_flex_col_usage_tl fdfcut,
apps.fnd_descr_flex_column_usages fdfcu,
apps.fnd_descr_flex_col_usage_tl fdfcud,
apps.fnd_application fa,
apps.fnd_flex_value_sets ffvs,
apps.fnd_lookups fl,
apps.fnd_executables fe
WHERE fcpt.user_concurrent_program_name = 'Payables Open Interface Import'
AND fcp.concurrent_program_id = fcpt.concurrent_program_id
AND fcpt.concurrent_program_id = fcpd.concurrent_program_id
AND fdfcut.application_id = fa.application_id
AND fdfcut.descriptive_flex_context_code = 'Global Data Elements'
AND fdfcut.descriptive_flexfield_name = '$SRS$.' || fcp.concurrent_program_name
AND fdfcut.application_id = fdfcu.application_id
AND fdfcut.descriptive_flex_context_code = fdfcu.descriptive_flex_context_code
AND fdfcut.descriptive_flexfield_name = fdfcu.descriptive_flexfield_name
AND fdfcut.application_column_name = fdfcu.application_column_name
AND fdfcut.application_id = fdfcud.application_id
AND fdfcut.descriptive_flex_context_code = fdfcud.descriptive_flex_context_code
AND fdfcut.descriptive_flexfield_name = fdfcud.descriptive_flexfield_name
AND fdfcut.application_column_name = fdfcud.application_column_name
AND fdfcu.flex_value_set_id = ffvs.flex_value_set_id
AND fcp.execution_method_code = fl.lookup_code
AND fl.lookup_type = 'CP_EXECUTION_METHOD_CODE'
AND fcp.executable_id = fe.executable_id
ORDER BY 1, 2, 3
SELECT cpt.user_concurrent_program_name,
cpt.description,
cp.concurrent_program_name,
a.application_short_name,
e.executable_name,
cp.creation_date,
uc.user_name creator,
cp.last_update_date,
ulu.user_name updater,
cp.enabled_flag,
cp.run_alone_flag,
cp.srs_flag,
cp.print_flag,
cp.save_output_flag,
cp.required_style,
cp.output_print_style,
cp.printer_name,
cp.minimum_width,
cp.minimum_length,
cp.output_file_type,
cp.enable_trace,
cp.restart,
cp.nls_compliant,
cp.request_set_flag
FROM applsys.fnd_concurrent_programs cp,
applsys.fnd_concurrent_programs_tl cpt,
applsys.fnd_application a,
applsys.fnd_executables e,
applsys.fnd_user uc,
applsys.fnd_user ulu
WHERE cp.creation_date > TO_DATE ('17-MAY-1995') -- Enter Creation Date
AND cp.application_id = cpt.application_id
AND cp.concurrent_program_id = cpt.concurrent_program_id
AND cpt.LANGUAGE = SYS_CONTEXT ('USERENV', 'LANG')
AND cp.application_id = a.application_id
AND cp.executable_application_id = e.application_id
AND cp.executable_id = e.executable_id
AND cp.created_by = uc.user_id
AND cp.last_updated_by = ulu.user_id
AND cpt.user_concurrent_program_name = 'Payables Open Interface Import'
ORDER BY cp.concurrent_program_name
2. Concurrent Program parametersSELECT cp.concurrent_program_name,
cu.*,
vs.flex_value_set_name
FROM applsys.fnd_concurrent_programs cp,
applsys.fnd_descr_flex_column_usages cu,
applsys.fnd_flex_value_sets vs
WHERE cp.creation_date > TO_DATE ('17-MAY-1995') --Enter Creation Date
AND cu.application_id = cp.application_id
AND cu.descriptive_flexfield_name = '$SRS$.' || cp.concurrent_program_name
AND cu.flex_value_set_id = vs.flex_value_set_id
AND cp.concurrent_program_id = :concurrent_program_id --(Enter
CONCURRENT_PROGRAM_ID of
CONCURRENT_PROGRAM)
ORDER BY cp.concurrent_program_name,
cu.column_seq_num
3. Concurrent Request Details
SELECT p.concurrent_program_name,
pt.user_concurrent_program_name,
rt.responsibility_name,
r.*
FROM applsys.fnd_concurrent_requests r,
applsys.fnd_concurrent_programs p,
applsys.fnd_concurrent_programs_tl pt,
applsys.fnd_responsibility rsp,
applsys.fnd_responsibility_tl rt
WHERE r.request_id = &request_id -- Enter Request ID
AND r.program_application_id = p.application_id
AND r.concurrent_program_id = p.concurrent_program_id
AND p.application_id = pt.application_id
AND p.concurrent_program_id = pt.concurrent_program_id
AND pt.LANGUAGE = SYS_CONTEXT ('USERENV', 'LANG')
AND r.responsibility_application_id = rsp.application_id
AND r.responsibility_id = rsp.responsibility_id
AND rsp.application_id = rt.application_id
AND rsp.responsibility_id = rt.responsibility_id
AND rt.LANGUAGE = SYS_CONTEXT ('USERENV', 'LANG')
4. Request Group Details
SELECT rga.application_short_name "Req Grp App",
rg.request_group_name "Request Group Name",
rg.request_group_code "Request Group Code",
rg.description "Request Group Desc",
cp.concurrent_program_name "Concurrent Program",
ea.application_short_name "Exec App",
e.executable_name "Executable",
rga.application_id "Req Grp App ID",
rg.request_group_id "Req Grp ID",
e.application_id "Exec App ID"
FROM applsys.fnd_executables e,
applsys.fnd_concurrent_programs cp,
applsys.fnd_request_group_units rgu,
applsys.fnd_request_groups rg,
applsys.fnd_application rga,
applsys.fnd_application ea
WHERE e.application_id LIKE '%'-- Enter Application ID
AND e.executable_name LIKE '%' -- Enter Executable Name
AND cp.executable_application_id = e.application_id
AND cp.executable_id = e.executable_id
AND cp.enabled_flag = 'Y'
AND rgu.request_unit_id = cp.concurrent_program_id
AND rgu.unit_application_id = cp.application_id
AND rgu.request_unit_type = 'P'
AND rg.application_id = rgu.application_id
AND rg.request_group_id = rgu.request_group_id
AND rga.application_id = rgu.application_id
AND ea.application_id = e.application_id
5. Request Set Details
SELECT rst.user_request_set_name,
rs.request_set_name,
rsst_start.user_stage_name start_stage,
rss.display_sequence stage_sequence,
rss.stage_name,
rss.request_set_stage_id,
rss.success_link,
rss.warning_link,
rss.error_link,
rsst.user_stage_name,
rsst.description stage_description,
rsp.SEQUENCE program_sequence,
cp.user_concurrent_program_name,
pa.*
FROM applsys.fnd_request_sets_tl rst,
applsys.fnd_request_sets rs,
applsys.fnd_request_set_stages_tl rsst_start,
applsys.fnd_request_set_stages rss,
applsys.fnd_request_set_stages_tl rsst,
applsys.fnd_request_set_programs rsp,
applsys.fnd_concurrent_programs_tl cp,
applsys.fnd_request_set_program_args pa
WHERE rs.request_set_name LIKE '%' -- Enter Request Set Name
AND rs.application_id = rst.application_id
AND rs.request_set_id = rst.request_set_id
AND rst.LANGUAGE = SYS_CONTEXT ('USERENV', 'LANG')
AND rsst_start.set_application_id = rs.application_id
AND rsst_start.request_set_id = rs.request_set_id
AND rsst_start.request_set_stage_id = rs.start_stage
AND rsst_start.LANGUAGE = 'US'
AND rss.set_application_id = rs.application_id
AND rss.request_set_id = rs.request_set_id
AND rsst.set_application_id = rss.set_application_id
AND rsst.request_set_id = rss.request_set_id
AND rsst.request_set_stage_id = rss.request_set_stage_id
AND rsst.LANGUAGE = 'US'
AND rsp.set_application_id = rss.set_application_id
AND rsp.request_set_id = rss.request_set_id
AND rsp.request_set_stage_id = rss.request_set_stage_id
AND rsp.program_application_id = cp.application_id
AND rsp.concurrent_program_id = cp.concurrent_program_id
AND cp.LANGUAGE = 'US'
AND pa.application_id(+) = rsp.set_application_id
AND pa.request_set_id(+) = rsp.request_set_id
AND pa.request_set_program_id(+) = rsp.request_set_program_id
ORDER BY rst.user_request_set_name,
rss.display_sequence,
rsp.SEQUENCE,
pa.descriptive_flex_appl_id,
pa.descriptive_flexfield_name,
pa.application_column_name
1.Find Locks Info
SELECT SID,
id1,
id2,
lmode,
request,
BLOCK
FROM v$lock
WHERE SID = &sid
2.Find Session Info
SELECT module,
action,
SID,
serial#
FROM v$session
WHERE action LIKE '%%'
3.Find Lock Mode
SELECT a.SID,
b.NAME,
a.id1,
a.lmode,
a.request
FROM v$lock a,
SYS.obj$ b
WHERE b.obj# = a.id1
4.Find Locked Objects SELECT oracle_username,
os_user_name,
session_id,
process,
locked_mode,
o.owner,
o.object_type,
o.object_name
FROM v$locked_object l,
SYS.dba_objects o
WHERE l.object_id = o.object_id
ORDER BY o.owner,
o.object_name,
session_id
5.Control File QuerySELECT * FROM v$controlfile
6.Folder Info QuerySELECT b.application_short_name,
d.responsibility_name,
a.OBJECT,
c.NAME folder_name
FROM apps.fnd_default_folders a,
apps.fnd_application b,
apps.fnd_folders c,
apps.fnd_responsibility_vl d
WHERE a.application_id = b.application_id
AND a.folder_id = c.folder_id
AND d.responsibility_id = - (a.user_id)
AND d.responsibility_name LIKE '%%'
ORDER BY b.application_short_name,
d.responsibility_name;
Create Users and assign Responsibilities:
§ Switch to System Administrator responsibility
§ Navigate to Security-->User-->Define
§ Add or query a User.
§ Add responsibility to user as required.
/*=============================================
CREATE APPLICATIONS USER FROM BACKEND
==============================================*/
DECLARE
v_user_name VARCHAR2 (30) := UPPER ('Raju');
v_password VARCHAR2 (30) := '******';
v_email VARCHAR2 (30) := UPPER ('[email protected]');
BEGIN
fnd_user_pkg.createuser (x_user_name => v_user_name,
x_owner => NULL,
x_unencrypted_password => v_password,
x_start_date => SYSDATE,
x_end_date => NULL,
x_email_address => v_email
);
COMMIT;
DBMS_OUTPUT.put_line ('User:' || v_user_name || 'Created Successfully');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ( 'Unable to create User due to' || SQLCODE || ' ' ||
SUBSTR (SQLERRM, 1, 100) );
ROLLBACK;
END;
select * from fnd_user
where user_name like 'RAJU'
/*=============================================
/*=============================================
PASSWORD RESET FOR THE APPLICATIONS USER FROM BACKEND
==============================================*/
DECLARE
v_user_name VARCHAR2 (30) := UPPER ('RAJU');
v_new_password VARCHAR2 (30) := '********';
v_status BOOLEAN;
BEGIN
v_status :=
fnd_user_pkg.changepassword (username => v_user_name,
newpassword => v_new_password
);
IF v_status = TRUE
THEN
DBMS_OUTPUT.put_line ( 'The password reset successfully for the User:' ||
v_user_name );
COMMIT;
ELSE
DBMS_OUTPUT.put_line ( 'Unable to reset password due to' || SQLCODE || '
' || SUBSTR (SQLERRM, 1, 100) );
ROLLBACK;
END IF;
END;
/*=============================================
Assign the Responsibilities to User from Backend
==============================================*/
DECLARE
V_username VARCHAR2 (30) := UPPER ('RAJU');
cursor cur is
SELECT r.responsibility_key,
a.application_short_name,
r.responsibility_name
FROM fnd_responsibility_vl r,
fnd_application_vl a
WHERE a.application_id = r.application_id
AND responsibility_name IN
('Application Developer'
,'Functional Administrator'
,'XML Publisher Administrator'
,'System Administrator'
,'General Ledger, Vision Operations (USA)'
,'Inventory, Vision Operations (USA)'
,'Payables, Vision Operations (USA)'
,'Receivables, Vision Operations (USA)'
,'Purchasing, Vision Operations (USA)'
)
;
BEGIN
FOR rec in cur
loop
fnd_user_pkg.addresp (username => V_username,
resp_app => rec.application_short_name,
resp_key => rec.responsibility_key,
security_group => 'STANDARD',
description => NULL,
start_date => SYSDATE,
end_date => NULL
);
DBMS_OUTPUT.put_line ( rec.responsibility_name || 'Responsibility Assigned to' ||
v_username );
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN DBMS_OUTPUT.put_line ( 'Unable to Assign Responsibilities to User' ||
SQLCODE || '
' || SUBSTR (SQLERRM, 1, 100) );
ROLLBACK;
END
FLEXFIELDS
Overview of Flexfields:
Key Flexfields:
A Key flexfield is a field made up of segments, where each segment has both a
value and a meaning, which appears on your form as a normal text field with an
appropriate prompt.
One example of a key flexfield is the Accounting Flexfield. This flexfield can always
Descriptive flexfields:
Descriptive flexfields lets you add additional fields to the form in order to track
additional information needed by the business that would not be captured by the
information your application stores depends on other values your users enter in
Descriptive flexfields have two different types of segments, global and context–
sensitive.
A global segment is a segment that always appears in the descriptive flexfield pop–
up window.
the form, or from a special field (a context field) inside the descriptive flexfield pop–
up window. If the descriptive flexfield derives the context information from a form
field (either displayed or hidden from users), that field is called a reference field for
descriptive flexfield requires one column for each possible segment and one
additional column in which to store structure information (that is, the context
value). The descriptive flexfield columns are usually named ATTRIBUTEn where n is
a number.
For example, if you have a descriptive flexfield on an Order Entry (Header) form, it
populates the Structure column with the context field and the columns ATTRIBUTEn
Field as ORDER.DF
registered.
To enable this
Number: 5
Column: ATTRIBUTE11
Press OK
You can assign any value set if you want, its optional so I am just leaving it as blank
Now to go to Order management super User, Vision Operations” and open the Sales
Field
To Make any changes you have to uncheck the “Freeze Flexfield Definition”
Checkbox
Press OK
1. Define Executable.
Note: You don’t really need to have PLSQL package defined for this demo.
Save it.
it to Request group
Note: Form more information about defining concurrent program and adding it to
http://erpschools.com/articles/concurrent-program-registration-and-add-it-to-
request-group
Value Sets
Save it.
Create Values for the value set we defined above
Navigation: Application Developer > View > Requests > Submit New Request >
———————————————————————————
Dependent Value Set
To define a Dependent value set we also need one Independent value set.
Example: To List down States in a Country we need to have list of Countries for
Ensure to Select Country name in “Independent Value” field before click Find.
Now repeat the above two steps to enter states of country USA
Ensure to select country as USA before clicking Find button
Save it.
as shown below
Navigation: Application Developer > Concurrent > Program > Query our Concurrent
Parameter-4
Click LOV button on Order Number field to see list of values available from
OE_ORDER_HEADERS_ALL table.
table.
Profile Option in Oracle Apps
Profile Option values control the behavior of Oracle Apps, in other words they
determine how Oracle Apps should run. The value for a profile option can be
For Example, we have a profile option called MO: Operating Unit. Assigning a value
to this profile option will determine what operating unit it should use when a user
We have two types of Profile options – System and Personal profile options
depending on to whom they are visible and who can update their values.
System Profile options are visible and can be updated only in System Administrator
User Profile Options are visible and can be updated by any end user of Oracle Apps.
Profile Options can be set at different levels. Site level being the highest and User
being the lowest in the hierarchy. If a profile option is assigned at two levels, then
Receivables)
Say you want to create a profile option called erpSchools Debug and the possible
values that the user can choose are Yes, No. If the user chooses Yes, then the
custom concurrent program will print all the debug messages otherwise the debug
messages will not printed in the log file of the concurrent request.
Profiles window will open up where you enter the below details:
Name: Give a meaningful and unique name for this profile option
Application: Enter the application for which this profile option will be used like
Payables, Receivables etc. If it is for a custom program then choose the custom
application.
User Profile Name: Again enter a meaningful and unique name. This is the name
and updatable.
Active dates: Enter the dates on which the profile option becomes active/inactive
User Access:
Visible – Determines whether your end users can see and query this profile option in
their personal profiles. Otherwise, they cannot query or update values for this
option.
Updatable – Determines whether your end users can change the value of this profile
option using their Profile Values window. Otherwise, your system administrator must
SQL Validation: You can write up a SQL statement to display the selected rows in
LOV. If this section is left blank, there will no LOV instead the user can enter any
Enter the below when the window opens and click on Find button
Under Display section, Choose at what level you want to assign a value.
In the Find field, enter the profile option name to which you want to assign the
value.
Enter the value that you want to assign to profile option at the appropriate level and
save.
We have seen how to create and assign value to profile option. Most of the times,
custom concurrent program will need to get the value of a profile option that will
determine its course of actions. You will use API called FND_PROFILE.
here.
1 BEGIN
3 END;
FNDLOAD Commands for AOL Objects
1. Lookups
-- -------------
FNDLOAD apps/apps O Y DOWNLOAD
$FND_TOP/patch/115/import/aflvmlu.lct XX_CUSTOM_LKP.ldt
FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="XXCUST"
LOOKUP_TYPE="XX_LOOKUP_TYPE"
2. Concurrent Program
-- -----------------------------
FNDLOAD apps/apps O Y DOWNLOAD
$FND_TOP/patch/115/import/afcpprog.lct XX_CUSTOM_CP.ldt PROGRAM
APPLICATION_SHORT_NAME="XXCUST"
CONCURRENT_PROGRAM_NAME="XX_CONCURRENT_PROGRAM"
3. Profile
-- ---------
FNDLOAD apps/apps O Y DOWNLOAD
$FND_TOP/patch/115/import/afscprof.lct XX_CUSTOM_PRF.ldt PROFILE
PROFILE_NAME="XX_PROFILE_NAME"
APPLICATION_SHORT_NAME="XXCUST"
$FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD
$FND_TOP/patch/115/import/afscprof.lct XX_CUSTOM_PRF.ldt -
WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
5. FND Message
-- ---------------------
FNDLOAD apps/apps 0 Y DOWNLOAD
$FND_TOP/patch/115/import/afmdmsg.lct XX_CUSTOM_MESG.ldt
FND_NEW_MESSAGES APPLICATION_SHORT_NAME="XXCUST"
MESSAGE_NAME="MESSAGE_NAME%"
6. D2K FORMS
-- ------------------
$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD
$FND_TOP/patch/115/import/afsload.lct XX_CUSTOM_FRM.ldt FORM
FORM_NAME="FORM_NAME"
$FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD
$FND_TOP/patch/115/import/afsload.lct XX_CUSTOM_FRM.ldt -
WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
7. Form Function
-- ---------------------
FNDLOAD apps/apps 0 Y DOWNLOAD
$FND_TOP/patch/115/import/afsload.lct XX_CUSTOM_FUNC.ldt FUNCTION
FUNCTION_NAME="FORM_FUNCTION_NAME"
8. Alerts
-- ---------
FNDLOAD apps/apps 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct
XX_CUSTOM_ALR.ldt ALR_ALERTS
APPLICATION_SHORT_NAME=XXCUST ALERT_NAME="XX - Alert Name"
9. Value Set
-- --------------
$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD
$FND_TOP/patch/115/import/afffload.lct XX_CUSTOM_VS.ldt VALUE_SET
FLEX_VALUE_SET_NAME="XX Value Set Name"
$FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD
$FND_TOP/patch/115/import/afffload.lct XX_CUSTOM_VS.ldt -
WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE