03 - AOL - Oracle Application Object Library (AOL) Training Manual
03 - AOL - Oracle Application Object Library (AOL) Training Manual
AOL is a collection of pre-built application components and facilities and it consists of forms,
subroutines, concurrent programs and reports, database tables and objects, messages, menus,
responsibilities, flex filed definitions, various guides and library functions.
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.
Agenda:
§ Setting Up Your Application.
§ Flex fields.
§ Profiles.
Register Functions:
§ A function is a part of an application functionality that is registered under a unique name for the
purpose of assigning /excluding it from a responsibility.
§ Application developers register functions when they develop forms.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
Menus:
§ A menu is a hierarchical arrangement of application functions that is displayed in the navigator
window.
§ A menu consists of menu entries, which could be a submenu or a function.
§ Form functions are selected and navigated to using Navigator window.
§ Each responsibility has a menu associated with it.
§ Note the Menu name associated with a responsibility.
Menus (Contd.):
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
Concurrent Program Name, Responsibility Name and User Name for a concurrent request id?
SELECT fcr.request_id,
frv.responsibility_name,
fcpv.concurrent_program_name prog_short_name,
fcpv.user_concurrent_program_name con_prog_name,
fu.user_name requested_by
FROM fnd_concurrent_requests fcr,
fnd_concurrent_programs_vl fcpv,
fnd_user fu,
fnd_responsibility_vl frv
WHERE fcpv.concurrent_program_id = fcr.concurrent_program_id
AND fu.user_id = fcr.requested_by
AND frv.responsibility_id = fcr.responsibility_id
AND fcr.request_id = &req_id;
Concurrent Program:
§ A concurrent program is an executable file that runs simultaneously with online operations and
with other concurrent programs.
§ We need a concurrent program for ..
1. Any long running data intensive program
2. Operating system script
3. Oracle Reports
§ The various steps to define and register a concurrent program are.
4. Define concurrent program executable
5. Define concurrent program
6. Include the concurrent program in a request group
7. Run concurrent program through submit request form.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
1. Flex Rpt The execution file is written using the Flex Report API.
2. Flex Sql The execution file is written using the Flex Sql API.
3. Host The execution file is a host script.
4. Oracle Reports The execution file is an Oracle Reports file.
5. PL/SQL Stored Procedure The execution file is a stored procedure.
6. SQL*Loader the execution file is a SQL script.
7. SQL*Plus the execution file is a SQL*Plus script.
8. SQL*Report the execution file is a SQL*Report script.
9. Spawned The execution file is a C or Pro*C program.
10.Immediate The execution file is a program written to run as
a subroutine of the concurrent manager.
§ Enter the execution file name without the file extension.
§ For PL/SQL stored procedures enter the <package>.<procedure name> in the execution file
name. This procedure must have 2 out parameters of type varchar2 preferably with names errbuf
and errout. These two parameters should be added before adding any other parameters.
/*=============================================
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';
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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;
/*=============================================
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;
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
Concurrent Program:
§ Define a concurrent program,
§ Choose an executable created, which will be executed once this concurrent program is scheduled to
run.
HTML.
PDF.
TEXT.
PS (Post Script).
PCL (HP’s Printer Control Language).
§
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
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,
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
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,
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
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;
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
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;
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
ADD CONCURRENT PROGRAM TO THE REQUEST GROUP FROM BACKEND
==============================================*/
SELECT * FROM FND_APPLICATION_VL
WHERE 1=1
AND APPLICATION_NAME = 'XXCUST Custom Application'
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',
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
----
>>=============================================================
=<<----
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
;
----
>>=============================================================
=<<----
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
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'
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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;
---
>>>===========================================================
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;
/*=============================================================
===========*/
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,
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
---
>>>===========================================================
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;
/*=============================================================
===========*/
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',
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
---
>>>===========================================================
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;
/*=============================================================
===========*/
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
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
);
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
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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.
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.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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.
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.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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,
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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')
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
BLOCK
FROM v$lock
WHERE SID = &sid
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
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,
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
/*=============================================
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 :=
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
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
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
);
EXCEPTION
WHEN OTHERS
THEN DBMS_OUTPUT.put_line ( 'Unable to Assign Responsibilities to User' || SQLCODE || '
' || SUBSTR (SQLERRM, 1, 100) );
ROLLBACK;
END;
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
§ There is a corresponding unique ID number (a code combination ID number or CCID) for that
code which is also stored in the combination table.
§ A flex field structure is a specific configuration of segments. Same flex field can have multiple
segment structure.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
Global Segments:
§ In Order management, if you want to add some extra Order line information, then query the DFF
for “Additional Line Attribute information”
§ Go to Global Data Elements context field.
§ Click segments to view the DFF segments.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
Ø Structure Column
§ If you use a reference field, the value of that field populates its own column. For example, if the
reference field on the form is the "Country" field, it populates the "country" column in the table.
§ However, the reference field value also populates the structure (context) column in the table, since
that value specifies which structure the flex field displays.
Value Sets:
Ø Use value set to:
§ Determine which values users can enter into flex field segments and concurrent program
parameters.
§ Provide a list of valid values using list of values feature
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
This Query gives details of value sets that are based on a oracle application tables:
Profiles:
User Profile:
§ A profile is a set of changeable options that affects the way your application runs
§ System Profile Options
1. Set by the System administrator
2. User cannot change
3. Any change in the system profile becomes effective only when the user logs on again or
change responsibility
§ Personal Profile Options
1. Set by the System Administrator
2. User can change the option values
3. Any changes become effective immediately
§ You need to create a profile in Application Developer responsibility and then assign its system and
personal values.
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
Values
• Navigate to
Sysadmin à Profiles
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
User Profile:
Ø User Profile Levels
§ A value set at the higher level overrides the one set at the lower level. “User” is the highest level.
§ After implementation System Administrator sets the default profile values at the site level
§ Option values are dynamically set at the run time.
/*==========================
PACKAGE SPECIFICATION
===========================*/
CREATE OR REPLACE PACKAGE apps.xxaa_fnd_concprg_registration
AS
v_executable VARCHAR2 (50) := 'XXAA_AR_AGING';
v_application VARCHAR2 (20) := 'Receivables';
v_cprogram VARCHAR2 (50) := 'XXAA_AR_AGING';
v_exec NUMBER (2);
v_cp NUMBER (2);
v_req_id NUMBER (10);
PROCEDURE xxaa_fnd_concprg_executable;
PROCEDURE xxaa_fnd_concprg_define;
PROCEDURE xxaa_fnd_concprg_parameter;
PROCEDURE xxaa_fnd_concprg_addtogroup;
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
PROCEDURE xxaa_fnd_concprg_submit;
PROCEDURE xxaa_fnd_concprg_wait_request;
PROCEDURE xxaa_fnd_concprg_main;
END;
/
/*==========================
PACKAGE BODY
===========================*/
CREATE OR REPLACE PACKAGE BODY apps.xxaa_fnd_concprg_registration
AS
/*
Author : Oralce Applications
Created_Date :
Last_Update_by :
Last_Updated_Date :
Purpose : Used Register Concurrent Program into apps (by creating Executable, Define and
Submit the Concurrent Program)
*/
----->>>=======================================================
PROCEDURE xxaa_fnd_concprg_executable
IS
BEGIN
SELECT COUNT (*)
INTO v_exec
FROM fnd_executables
WHERE executable_name = v_executable;
IF v_exec = 0
THEN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END xxaa_fnd_concprg_executable;
----->>>=======================================================
PROCEDURE xxaa_fnd_concprg_define
IS
BEGIN
SELECT COUNT (*)
INTO v_exec
FROM fnd_executables
WHERE executable_name = v_executable;
IF v_exec = 1
THEN
--DBMS_OUTPUT.PUT_LINE ('succeefully created executable name is '||V_EXECUTABLE) ;
SELECT COUNT (*)
INTO v_cp
FROM fnd_concurrent_programs
WHERE concurrent_program_name = v_cprogram;
IF v_cp = 0
THEN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.REGISTER (program => v_cprogram,
application => v_application,
enabled => 'Y',
short_name => v_cprogram,
executable_short_name => v_executable,
executable_application => v_application,
style => 'A4',
output_type => 'TEXT',
use_in_srs => 'Y'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'succeefully created concurrent program ' || v_cprogram );
ELSE
DBMS_OUTPUT.put_line ( 'concurrent program is not created' || SQLCODE || SQLERRM );
END IF;
ELSE
DBMS_OUTPUT.put_line ( 'this executable' || v_executable || ' is not created ' );
END IF;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
END xxaa_fnd_concprg_define;
----->>>=======================================================
PROCEDURE xxaa_fnd_concprg_parameter
IS
BEGIN
SELECT COUNT (*)
INTO v_cp
FROM fnd_concurrent_programs
WHERE concurrent_program_name = v_cprogram;
IF v_cp = 1
THEN
BEGIN
--DBMS_OUTPUT.PUT_LINE ('succeefully created concurrent program '||V_EXECUTABLE) ;
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.parameter (program_short_name => v_cprogram,
application => v_application,
SEQUENCE => 10,
parameter => 'Date From',
enabled => 'Y',
value_set => '240 char',
display_size => 50,
description_size => 20,
concatenated_description_size => 20,
prompt => 'Date From',
token => 'P_DATE_FROM'
);
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;
BEGIN
fnd_program.parameter (program_short_name => v_cprogram,
application => v_application,
SEQUENCE => 20,
parameter => 'Date To',
enabled => 'Y',
value_set => '240 char',
display_size => 50,
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
----->>>=======================================================
PROCEDURE xxaa_fnd_concprg_addtogroup
IS
BEGIN
SELECT COUNT (*)
INTO v_cp
FROM fnd_concurrent_programs
WHERE concurrent_program_name = v_cprogram;
IF v_cp = 1
THEN
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
fnd_program.add_to_group
(program_short_name => v_cprogram,
program_application => v_application,
request_group => 'Receivables All',
group_application => 'Receivables'
);
COMMIT;
DBMS_OUTPUT.put_line
('succeefully attached concurrent program to request group');
EXCEPTION
WHEN OTHERS
THEN
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
----->>>=======================================================
PROCEDURE xxaa_fnd_concprg_submit
IS
BEGIN
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
v_req_id :=
fnd_request.submit_request (application => 'AR',
program => v_cprogram,
argument1 => '10',
argument2 => '1000'
);
COMMIT;
DBMS_OUTPUT.put_line ( 'successfully submitted. request id is' || v_req_id );
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END xxaa_fnd_concprg_submit;
----->>>=======================================================
PROCEDURE xxaa_fnd_concprg_wait_request
IS
v_req_id2 NUMBER (2);
v_phase VARCHAR2 (10);
v_status VARCHAR2 (10);
v_phase1 VARCHAR2 (10);
v_status1 VARCHAR2 (10);
v_phase2 VARCHAR2 (10);
v_status2 VARCHAR2 (10);
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
v_b BOOLEAN;
BEGIN
SELECT COUNT (*)
INTO v_req_id2
FROM fnd_concurrent_requests
WHERE request_id = v_req_id;
IF v_req_id2 = 1
THEN
--DBMS_OUTPUT.PUT_LINE ('succeefully submitted request id is '||V_REQ_ID) ;
BEGIN
fnd_global.apps_initialize (user_id => 1318,
resp_id => 21623,
resp_appl_id => 660
);
v_b :=
fnd_concurrent.wait_for_request (request_id => v_req_id,
INTERVAL => 60,
max_wait => 0,
phase => v_phase,
status => v_status,
apps88_phase => v_phase1,
apps88_status => v_status1,
MESSAGE => v_phase2
);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('error out here' || SQLCODE || SQLERRM);
END;
ELSE
DBMS_OUTPUT.put_line (v_req_id || v_phase || ' ' || v_status);
END IF;
ELSE
DBMS_OUTPUT.put_line ('ERROR FOR SUBMITION THE REQUEST. REQUEST ID IS ' ||
v_req_id );
RAJU CHINTHAPATLA
Oracle Application Object Library (AOL) Objects Creation from Application and Database OracleApps88
END IF;
END xxaa_fnd_concprg_wait_request;
----->>>=======================================================
PROCEDURE xxaa_fnd_concprg_main
IS
BEGIN
xxaa_fnd_concprg_registration.xxaa_fnd_concprg_executable;
xxaa_fnd_concprg_registration.xxaa_fnd_concprg_define;
xxaa_fnd_concprg_registration.xxaa_fnd_concprg_parameter;
xxaa_fnd_concprg_registration.xxaa_fnd_concprg_addtogroup;
-- xxaa_fnd_concprg_registration.xxaa_fnd_concprg_submit;
-- xxaa_fnd_concprg_registration.xxaa_fnd_concprg_wait_request;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('ERROR OUT HERE' || SQLCODE || SQLERRM);
END xxaa_fnd_concprg_main;
----->>>=======================================================
END xxaa_fnd_concprg_registration;
/
RAJU CHINTHAPATLA