Top Banner

of 63

AOL – Oracle Application Object Library Training Manual

Feb 28, 2018

Download

Documents

Nagendra Yadav
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    1/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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.

    Setting Up Your Application: Oracle Applications and custom applications that integrate with Oracle

    Applications need to have a particular directory structure where its Components must be available. Those components are,

    1. Forms2. Menus3. Programs4. Reports.

    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.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    2/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    select* fromfnd_form_functionsselect* fromfnd_form_functions_tl

    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.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    3/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    SELECT* FROMFND_RESPONSIBILITY_TLWHERERESPONSIBILITY_NAME ='Application Developer'

    Menus (Contd.):

    select* fromFND_MENUS_VL

    SELECT* FROMFND_MENUS

    SELECT* FROMFND_MENUS_TL

    SELECT* FROMFND_MENU_ENTRIES

    SELECT* FROMFND_MENU_ENTRIES_TL

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    4/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Query the menu name to find the menu entries. Add your functions as menu entries here or create a new menu with your functions and add that as a

    sub- menu here. Now you switch the responsibility and check whether your menu entry is appearing in corresponding

    responsibility.

    List of Menus Excluded from a given Responsibility:

    SELECTfrv.responsibility_name,fmv.user_menu_nameFROMfnd_resp_functions frf,

    fnd_menus_vl fmv,fnd_responsibility_vl frv

    WHEREfrf.rule_type ='M'ANDfrf.action_id =fmv.menu_idANDfrf.responsibility_id =frv.responsibility_idANDfrv.responsibility_name ='&resp_name';

    List of Functions Excluded from a given responsibility:SELECTfrv.responsibility_name,

    fffv.user_function_nameFROMfnd_resp_functions frf,

    fnd_form_functions_vl fffv,fnd_responsibility_vl frv

    WHEREfrf.rule_type ='F'ANDfrf.action_id =fffv.function_idANDfrf.responsibility_id =frv.responsibility_idANDfrv.responsibility_name ='&resp_name';

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    5/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Concurrent Program Name, Responsibility Name and User Name for a concurrent request id?SELECTfcr.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

    FROMfnd_concurrent_requests fcr,fnd_concurrent_programs_vl fcpv,fnd_user fu,fnd_responsibility_vl frv

    WHEREfcpv.concurrent_program_id =fcr.concurrent_program_idANDfu.user_id =fcr.requested_byANDfrv.responsibility_id =fcr.responsibility_idANDfcr.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 program2.

    Operating system script3. Oracle Reports

    The various steps to define and register a concurrent program are.4. Define concurrent program executable5. Define concurrent program6. Include the concurrent program in a request group7. Run concurrent program through submit request form.

    Concurrent Program Executable:

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    6/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Enter a name for executable and short name.

    Choose the application to which this executable belongs such that the system will Look for this file in that directory structure. Enter the execution method as1. 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/SQLstored procedures enter the . in the execution file

    name. This procedure must have 2 out parameters of type varchar2 preferably with names errbuf anderrout. These two parameters should be added before adding any other parameters.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    7/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /*=============================================

    CREATE CONCURRENT PROGRAM EXECUTABLE FROM BACKEND

    ==============================================*/SELECT* FROMFND_APPLICATION_VLWHERE1=1ANDAPPLICATION_SHORT_NAME LIKE'XXCUST'

    DECLAREv_executable VARCHAR2(50):='XXAA_AR_AGING';

    BEGINfnd_global.apps_initialize (user_id =>1318,

    resp_id =>21623,resp_appl_id =>660);

    fnd_program.executable (executable =>'XXAA Ar AgingReport', 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* FROMfnd_executablesWHEREexecution_file_name ='XXAA_AR_AGING'

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    8/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    9/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /*=============================================

    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* FROMfnd_executables_vl

    WHEREexecution_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 (HPs Printer Control Language).

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    10/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    11/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    12/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /*=============================================

    CREATE CONCURRENT PROGRAM DEFINE FROM BACKEND

    ==============================================*/SELECT* FROMFND_APPLICATION_VLWHERE1=1ANDAPPLICATION_NAME ='XXCUST Custom Application'

    DECLAREv_name VARCHAR2(50):='XXAA Ar Aging Report';v_short_name VARCHAR2(50):='XXAA_AR_AGING';

    BEGINfnd_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* FROMfnd_concurrent_programs_vlWHEREconcurrent_program_name='XXAA_AR_AGING'

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    13/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    14/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /*=============================================

    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* FROMfnd_concurrent_programs_vlWHEREconcurrent_program_name='XXAA_AR_AGING'

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    15/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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 linkedto 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

    WHENOTHERSTHENDBMS_OUTPUT.put_line('error out here'|| SQLCODE||

    SQLERRM);END;

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    16/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    17/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    18/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /* =============================================

    DELETE PARAMETERS IN THE CONCURRENT PROGRAM FROM BACKEND

    ==============================================* /DECLARE

    v_short_name VARCHAR2(50):='XXAA_AR_AGING';--> Conc ProgramShort NameBEGIN

    fnd_program.DELETE_PARAMETER (program_short_name =>v_short_name,

    application =>'XXCUSTCustom Application',

    parameter =>'P_DATE');

    COMMIT;DBMS_OUTPUT.put_line( 'Parameter succeefully Deleted For The

    Concurrent Program '|| v_short_name );END;

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    19/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Define Request Group: Note the Request group name for the responsibility, with which you want to attach the

    concurrent program.

    SELECT* FROMFND_APPLICATION_VLWHERE1=1ANDAPPLICATION_NAME ='XXCUST Custom Application'

    SELECT* FROMFND_RESPONSIBILITY_VLWHERE1=1ANDRESPONSIBILITY_NAME ='Receivables, Vision Operations (USA)'

    SELECT* FROMfnd_request_groupsWHERE1=1ANDrequest_group_name like'Receivables All'

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    20/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Define Request Group (Contd.): 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.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    21/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    22/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /* =============================================

    ADD CONCURRENT PROGRAM TO THE REQUEST GROUP FROM BACKEND

    ==============================================* /SELECT* FROMFND_APPLICATION_VLWHERE1=1

    ANDAPPLICATION_NAME ='XXCUST Custom Application'

    SELECT* FROMFND_RESPONSIBILITY_VLWHERE1=1ANDRESPONSIBILITY_NAME ='Receivables, Vision Operations (USA)'

    SELECT* FROMfnd_request_groupsWHERE1=1ANDrequest_group_name like'Receivables All'

    DECLAREv_short_name VARCHAR2(50):='XXAA_AR_AGING';--> Conc Program

    Short NameBEGIN

    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,

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    23/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    program_application =>'XXCUSTCustom Application',

    request_group =>'ReceivablesAll',

    group_application =>'Receivables'

    );

    COMMIT;DBMS_OUTPUT.put_line( 'succeefully attached concurrent program

    to request group'|| v_short_name );EXCEPTION

    WHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);END;

    ----

    >>==============================================================

  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    24/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    ---->>==============================================================

  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    25/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /* =============================================

    DELETE CONCURRENT PROGRAM FROM THE REQUEST GROUP FROM BACKEND

    ==============================================* /DECLARE

    v_short_name VARCHAR2(50):='XXAA_AR_AGING';--> Conc ProgramShort NameBEGIN

    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 =>'XXCUSTCustom Application',

    request_group =>'Receivables All',

    group_application =>

    'Receivables' );COMMIT;DBMS_OUTPUT.put_line( 'Successfully Deleted executable name is

    '|| v_short_name );END;

    /*========================================================================*/SELECT* FROMFND_APPLICATION_VL

    WHERE1=1ANDAPPLICATION_NAME ='XXCUST Custom Application'

    DECLAREv_name VARCHAR2(50):='XXAA Ar Aging Report';v_short_name VARCHAR2(50):='XXAA_AR_AGING';

    BEGINfnd_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);

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    26/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    COMMIT;DBMS_OUTPUT.put_line( 'succeefully created executable name is

    '|| v_short_name );END;

    SELECT* FROMfnd_executables_vlWHEREexecution_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 succeefullyDeleted'|| v_short_name );END;

    SELECT* FROMfnd_executables_vlWHEREexecution_file_name ='XXAA_AR_AGING'

    /*========================================================================*/

    SELECT* FROMFND_APPLICATION_VLWHERE1=1ANDAPPLICATION_NAME ='XXCUST Custom Application'

    DECLAREv_name VARCHAR2(50):='XXAA Ar Aging Report';v_short_name VARCHAR2(50):='XXAA_AR_AGING';

    BEGINfnd_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',

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    27/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    style =>'A4',output_type =>'TEXT',use_in_srs =>'Y');

    COMMIT;DBMS_OUTPUT.put_line('succeefully created concurrent program '||

    v_short_name );

    END;

    SELECT* FROMfnd_concurrent_programs_vlWHEREconcurrent_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* FROMfnd_concurrent_programs_vlWHEREconcurrent_program_name='XXAA_AR_AGING'

    /*========================================================================*/

    DECLAREv_short_name VARCHAR2(50):='XXAA_AR_AGING';--> Conc Program

    Short NameBEGIN

    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',

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    28/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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

    WHENOTHERSTHENDBMS_OUTPUT.put_line('error out here'|| SQLCODE||

    SQLERRM);

    END;

    --->>>===========================================================

    DECLAREv_short_name VARCHAR2(50):='XXAA_AR_AGING';--> Conc Program

    Short NameBEGIN

    fnd_program.DELETE_PARAMETER (program_short_name =>v_short_name,

    application =>'XXCUSTCustom Application',

    parameter =>'P_DATE');

    COMMIT;DBMS_OUTPUT.put_line( 'Parameter succeefully Deleted For The

    Concurrent Program '|| v_short_name );END;

    /*========================================================================*/

    SELECT* FROMFND_APPLICATION_VL

    WHERE1=1ANDAPPLICATION_NAME ='XXCUST Custom Application'

    SELECT* FROMFND_RESPONSIBILITY_VLWHERE1=1ANDRESPONSIBILITY_NAME ='Receivables, Vision Operations (USA)'

    SELECT* FROMfnd_request_groups

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    29/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    WHERE1=1ANDrequest_group_name like'Receivables All'

    DECLAREv_short_name VARCHAR2(50):='XXAA_AR_AGING';--> Conc Program

    Short NameBEGIN

    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 =>'XXCUSTCustom Application',

    request_group =>'ReceivablesAll',

    group_application =>

    'Receivables' );COMMIT;DBMS_OUTPUT.put_line( 'succeefully attached concurrent program

    to request group'|| v_short_name );EXCEPTION

    WHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);END;

    SELECTfcpt.user_concurrent_program_name,frg.request_group_name,fcp.concurrent_program_name,frt.responsibility_name,fat.application_name,fa.application_short_name,fa.basepath

    FROMfnd_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

    WHERE1=1ANDfat.application_id =frgu.application_idANDfrgu.request_unit_id =fcp.concurrent_program_id

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    30/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    ANDfrgu.request_group_id =frg.request_group_idANDfe.executable_id =fcp.executable_idANDfcp.concurrent_program_id =fcpt.concurrent_program_idANDfrg.request_group_id =fr.request_group_idANDfr.responsibility_id =frt.responsibility_idANDfa.application_id =fat.application_idANDfcpt.user_concurrent_program_name LIKE'XXAA Ar Aging Report'

    ORDERBY6,4,3,2;

    --->>>===========================================================

    DECLAREv_short_name VARCHAR2(50):='XXAA_AR_AGING';--> Conc Program

    Short NameBEGIN

    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:SELECTfcpv.concurrent_program_name short_name,

    fcpv.user_concurrent_program_name conc_prog_name,frg.request_group_name req_group_name

    FROMfnd_concurrent_programs_vl fcpv,

    fnd_request_groups frg,fnd_request_group_units frgu

    WHEREfcpv.concurrent_program_id =frgu.request_unit_idANDfcpv.enabled_flag ='Y'ANDfrgu.request_group_id =frg.request_group_idANDfrg.request_group_name ='&request_group_name';

    Check if the concurrent program is assigned to a given responsibility:

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    31/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    SELECTfcpv.concurrent_program_name short_name,fcpv.user_concurrent_program_name conc_prog_name,frg.request_group_name req_group_name,frv.responsibility_name

    FROMfnd_concurrent_programs_vl fcpv,fnd_request_groups frg,fnd_request_group_units frgu,

    fnd_responsibility_vl frvWHEREfcpv.concurrent_program_id =frgu.request_unit_idANDfcpv.enabled_flag ='Y'ANDfrgu.request_group_id =frg.request_group_idANDfrg.request_group_id =frv.request_group_idANDfrv.responsibility_name ='&resp_name'ANDfcpv.user_concurrent_program_name ='&con_prg_name';

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    32/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    SRS Form: Then use SRS(Standard Report Submission) form for running and monitoring your

    applications 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.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    33/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Concurrent Programs Business Events:In R12 for concurrent programs submission and completion has business events associated with themin the concurrent program definition form there is a business events tab which displays the list of eventsassociated

    here you specify the points at which business events are enabled. The possible points are:

    Request Submitted

    Request On HoldRequest 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 willneed to set "Yes" to enable Business Events from Concurrent Processing SystemWithin each phase, a requests 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 ofthe Request Details zone.

    Terminated:Running request is terminated, by selecting Terminate in the Status field of theRequest Details zone.

    Phase: INACTIVE: Disabled: Program to run request is not enabled. Contact your system administrator.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    34/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    On Hold: Pending request is placed on hold, by selecting Hold in the Status field of the RequestDetails 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 astage 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.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    35/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Useful FND Queries:

    1. Concurrent Program InfoSELECT 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

    FROMapps.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 feWHEREfcpt.user_concurrent_program_name ='Payables Open Interface

    Import'ANDfcp.concurrent_program_id =fcpt.concurrent_program_idANDfcpt.concurrent_program_id =fcpd.concurrent_program_idANDfdfcut.application_id =fa.application_idANDfdfcut.descriptive_flex_context_code ='Global Data

    Elements'ANDfdfcut.descriptive_flexfield_name ='$SRS$.'||

    fcp.concurrent_program_nameANDfdfcut.application_id =fdfcu.application_idANDfdfcut.descriptive_flex_context_code =

    fdfcu.descriptive_flex_context_codeANDfdfcut.descriptive_flexfield_name =

    fdfcu.descriptive_flexfield_nameANDfdfcut.application_column_name =

    fdfcu.application_column_nameANDfdfcut.application_id =fdfcud.application_idANDfdfcut.descriptive_flex_context_code =

    fdfcud.descriptive_flex_context_codeANDfdfcut.descriptive_flexfield_name =

    fdfcud.descriptive_flexfield_name

    ANDfdfcut.application_column_name =fdfcud.application_column_name

    ANDfdfcu.flex_value_set_id =ffvs.flex_value_set_idANDfcp.execution_method_code =fl.lookup_codeANDfl.lookup_type ='CP_EXECUTION_METHOD_CODE'ANDfcp.executable_id =fe.executable_id

    ORDERBY1,2,3

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    36/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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

    FROMapplsys.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

    WHEREcp.creation_date >TO_DATE('17-MAY-1995') -- EnterCreation Date

    ANDcp.application_id =cpt.application_idANDcp.concurrent_program_id =cpt.concurrent_program_idANDcpt.LANGUAGE=SYS_CONTEXT('USERENV','LANG')ANDcp.application_id =a.application_idANDcp.executable_application_id =e.application_idANDcp.executable_id =e.executable_idANDcp.created_by =uc.user_idANDcp.last_updated_by =ulu.user_idANDcpt.user_concurrent_program_name ='Payables Open Interface

    Import'ORDERBYcp.concurrent_program_name

    2. Concurrent Program parametersSELECT cp.concurrent_program_name,

    cu.*,vs.flex_value_set_name

    FROMapplsys.fnd_concurrent_programs cp,

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    37/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    applsys.fnd_descr_flex_column_usages cu,applsys.fnd_flex_value_sets vs

    WHEREcp.creation_date >TO_DATE('17-MAY-1995') --EnterCreation Date

    ANDcu.application_id =cp.application_idANDcu.descriptive_flexfield_name ='$SRS$.'||

    cp.concurrent_program_name

    ANDcu.flex_value_set_id =vs.flex_value_set_idANDcp.concurrent_program_id =:concurrent_program_id --(Enter

    CONCURRENT_PROGRAM_ID of CONCURRENT_PROGRAM)ORDERBYcp.concurrent_program_name,

    cu.column_seq_num

    3. Concurrent Request DetailsSELECTp.concurrent_program_name,

    pt.user_concurrent_program_name,rt.responsibility_name,r.*

    FROMapplsys.fnd_concurrent_requests r,applsys.fnd_concurrent_programs p,applsys.fnd_concurrent_programs_tl pt,applsys.fnd_responsibility rsp,applsys.fnd_responsibility_tl rt

    WHEREr.request_id =&request_id -- EnterRequest ID

    ANDr.program_application_id =p.application_idANDr.concurrent_program_id =p.concurrent_program_idANDp.application_id =pt.application_idANDp.concurrent_program_id =pt.concurrent_program_idANDpt.LANGUAGE=SYS_CONTEXT('USERENV','LANG')ANDr.responsibility_application_id =rsp.application_idANDr.responsibility_id =rsp.responsibility_idANDrsp.application_id =rt.application_idANDrsp.responsibility_id =rt.responsibility_idANDrt.LANGUAGE=SYS_CONTEXT('USERENV','LANG')

    4. Request Group DetailsSELECTrga.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"

    FROMapplsys.fnd_executables e,applsys.fnd_concurrent_programs cp,

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    38/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    applsys.fnd_request_group_units rgu,applsys.fnd_request_groups rg,applsys.fnd_application rga,applsys.fnd_application ea

    WHEREe.application_id LIKE'%'-- Enter Application IDANDe.executable_name LIKE'%'-- Enter Executable NameANDcp.executable_application_id =e.application_id

    ANDcp.executable_id =e.executable_idANDcp.enabled_flag ='Y'ANDrgu.request_unit_id =cp.concurrent_program_idANDrgu.unit_application_id =cp.application_idANDrgu.request_unit_type ='P'ANDrg.application_id =rgu.application_idANDrg.request_group_id =rgu.request_group_idANDrga.application_id =rgu.application_idANDea.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.SEQUENCEprogram_sequence,cp.user_concurrent_program_name,pa.*

    FROMapplsys.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

    WHERErs.request_set_name LIKE'%'-- Enter Request Set Name

    ANDrs.application_id =rst.application_idANDrs.request_set_id =rst.request_set_idANDrst.LANGUAGE=SYS_CONTEXT('USERENV','LANG')ANDrsst_start.set_application_id =rs.application_idANDrsst_start.request_set_id =rs.request_set_idANDrsst_start.request_set_stage_id =rs.start_stageANDrsst_start.LANGUAGE='US'ANDrss.set_application_id =rs.application_id

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    39/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    ANDrss.request_set_id =rs.request_set_idANDrsst.set_application_id =rss.set_application_idANDrsst.request_set_id =rss.request_set_idANDrsst.request_set_stage_id =rss.request_set_stage_idANDrsst.LANGUAGE='US'ANDrsp.set_application_id =rss.set_application_idANDrsp.request_set_id =rss.request_set_id

    ANDrsp.request_set_stage_id =rss.request_set_stage_idANDrsp.program_application_id =cp.application_idANDrsp.concurrent_program_id =cp.concurrent_program_idANDcp.LANGUAGE='US'ANDpa.application_id(+)=rsp.set_application_idANDpa.request_set_id(+)=rsp.request_set_idANDpa.request_set_program_id(+)=rsp.request_set_program_id

    ORDERBYrst.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 InfoSELECTSID,

    id1,id2,lmode,request,BLOCK

    FROMv$lockWHERESID=&sid

    2.Find Session InfoSELECTmodule,

    action,SID,serial#

    FROMv$sessionWHEREaction LIKE'%%'

    3.Find Lock ModeSELECTa.SID,

    b.NAME,a.id1,a.lmode,a.request

    FROMv$lock a,SYS.obj$ b

    WHEREb.obj# =a.id1

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    40/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    4.Find Locked ObjectsSELECT oracle_username,

    os_user_name,session_id,process,locked_mode,o.owner,

    o.object_type,o.object_name

    FROMv$locked_object l,SYS.dba_objects o

    WHEREl.object_id =o.object_idORDERBYo.owner,

    o.object_name,session_id

    5.Control File QuerySELECT* FROMv$controlfile

    6.Folder Info QuerySELECT b.application_short_name,

    d.responsibility_name,a.OBJECT,c.NAMEfolder_name

    FROMapps.fnd_default_folders a,apps.fnd_application b,apps.fnd_folders c,apps.fnd_responsibility_vl d

    WHEREa.application_id =b.application_idANDa.folder_id =c.folder_idANDd.responsibility_id =-(a.user_id)ANDd.responsibility_name LIKE'%%'

    ORDERBYb.application_short_name,d.responsibility_name;

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    41/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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');

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    42/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    EXCEPTIONWHENOTHERSTHEN

    DBMS_OUTPUT.put_line( 'Unable to create User due to'||SQLCODE|| ' '|| SUBSTR(SQLERRM,1,100));

    ROLLBACK;END;

    select* fromfnd_userwhereuser_name like'RAJU'

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    43/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /*=============================================

    PASSWORD RESET FOR THE APPLICATIONS USER FROM BACKEND

    ==============================================*/DECLARE

    v_user_name VARCHAR2(30):=UPPER('RAJU');v_new_password VARCHAR2(30):='********';v_status BOOLEAN;

    BEGINv_status :=

    fnd_user_pkg.changepassword (username =>v_user_name,newpassword =>v_new_password);

    IFv_status =TRUETHEN

    DBMS_OUTPUT.put_line('The password reset successfully for theUser:'|| v_user_name );

    COMMIT;

    ELSEDBMS_OUTPUT.put_line( 'Unable to reset password due to'||SQLCODE|| ' '|| SUBSTR(SQLERRM,1,100));

    ROLLBACK;ENDIF;

    END;

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    44/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /*=============================================

    Assign the Responsibilities to User from Backend

    ==============================================*/DECLARE

    V_username VARCHAR2(30):=UPPER('RAJU');cursorcur is

    SELECT r.responsibility_key,

    a.application_short_name,r.responsibility_name

    FROMfnd_responsibility_vl r,fnd_application_vl a

    WHEREa.application_id =r.application_idANDresponsibility_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

    FORrec incurloop

    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;

    ENDLOOP;

    EXCEPTIONWHENOTHERS

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    45/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    THENDBMS_OUTPUT.put_line( 'Unable to AssignResponsibilities to User'|| SQLCODE|| ' '|| SUBSTR(SQLERRM,1,100));

    ROLLBACK;END;

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    46/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Key Flex fields: Most businesses use codes made up of meaningful segments to identify Account Number, Part

    number and other business entities, eg: a company might have a part numberPADNRYEL8 1/2x14 indicating a notepad, narrowruled, yellow, and 14 by 8 1/2.

    A Flex field is a field which is made up of segments. Each segment has a name and a set of valid values. A Key flex field identifies an entity.

    Register Key Flex fields: Register your key flex field with Oracle Application Object Library. Each key flex field has one corresponding table, known as the combinations table, where the

    flex field stores a list of the complete codes, with one column for each segment of the code. 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.

    Customize Key Flex field Segments:

    A segment is a single subfield within a flex field. You define the appearance and meaning ofindividual segments when customizing a flex field.

    A segment is represented in your database as a single table column. Flex field validates each segment against a set of valid values, which are mostly predefined A flex field qualifier identifies a particular segment of a key flex field.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    47/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Key Flex field Feature:

    Dynamic Insertion: The insertion of a new valid combination into a combinations table from a form other than the

    combinations form.

    Key Flex field Cross validation:

    CrossValidation: Crossvalidation rules prevent users from creating new key flex field combinations that contain

    values that should not coexist in the same combination.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    48/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    49/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Descriptive Flex fields: Descriptive flex fields provide customizable "expansion space" on your forms. You can use

    descriptive flex fields to have additional information, important and unique to your business thatwould not otherwise be captured by the form.

    A descriptive flex field appears on a form as a single-character, unnamed field enclosed inbrackets.

    Descriptive flex fields have two different types of segments, global and context-sensitive.

    Aglobal segment is a segment that always appears in the descriptive flex field pop-up window. A context-sensitive segment is a segment that may or may not appear depending upon what

    other information is present in your form.

    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.

    Global Segments (Contd.): Already used segments for the DFF will appear here

    You can create a new record and use a previously unused attribute and make it enabled anddisplayed

    Save and compile the flex field definition. Navigate to Order Management, Enter orders screen. Enter or query an order and go to line DFF You can see the additional information you enabled now The DFF data gets stored in attribute columns of the base table.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    50/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Context sensitive Segments: A context-sensitive descriptive flex field can gather context information from either a field

    on the form, or from a special field (a context field) inside the descriptive flex field pop-upwindow.

    If the descriptive flex field derives the context information from a form field, that field iscalled a reference field for the descriptive flex field.

    In DFF Segments form check Displayed for the context.

    Optionally change the prompt of context Choose the reference field from LOV, which should be initially defined in Register DFF

    form.

    The reference field is same as a normal form field. Reference fields provide a way to map the context-sensitivity of descriptive flex field

    information that has been captured to existing conditions in your business data. Descriptive flex field segments... Multiple Structure Reference field 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.

    Benefits of Flex fields: Flex fields provides features that are required to satisfy the following business needs:

    1. Customize your applications to conform to your current business practice for accountingcodes, product codes, and other codes.

    2. Customize your applications to capture data that would not otherwise be tracked by your

    application.3. Have intelligent fields that are fields comprised of one or more segments, where each

    segment has both a value and a meaning.4. Rely upon your application to validate the values and the combination of values that you

    enter in intelligent fields (Cross Validation Rules).5. Have the structure of an intelligent field change depending on data in your form or

    application data.6. Customize data fields to your meet your business needs without programming.7. Query intelligent fields for very specific information.

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    51/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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

    Validation Type for Value Set: None (not validated at all) Table Independent Dependent

    Table validated Value Sets:

    Create a validation table in your database Register your table with Oracle Application Object Library (as a table) Create the necessary grants and synonyms Define a value set that uses your validation table

    Define your flex field structure to use that value set for a segment.

    Create a value set with a name, format type and length. Specify validation type as Table and click on details button Enter the Application name (optional), table name. Enter the column names which you want to display as value and meaning (optional) Enter the column name which need to be stored in the database in ID field

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    52/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Mention the data type of these columns Enter where and order by clause as appropriate.

    Independent/Dependent Value Sets:

    Create your independent value set first Create your dependent value set, specifying a default value Define your independent values

    Define your dependent values.

    This Query gives details of value sets that are based on a oracle application tables:

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    53/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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 administrator2. User cannot change3. 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 Administrator2. User can change the option values3. Any changes become effective immediately

    You need to create a profile in Application Developer responsibility and then assign its systemand personal values.

    User Profile Forms: Define new user profile option at the time of developing a new application Profile names must be unique

    A profile option cannot be deleted.

    Setting Profile Values:

    Setting System Profile

    Values

    Navigate toSysadminProfiles

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    54/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    Setting Personal Profile

    Values:

    Click on Menu Edit -> Preferences -> Profile.

    User Profile:

    User Profile Levels

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    55/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    A value set at the higher level overrides the one set at the lower level. User is the highestlevel.

    After implementation System Administrator sets the default profile values at the site level Option values are dynamically set at the run time.

    User Profile Routines: User Profile routines that helps in retrieving option values are,

    FND_PROFILE.GET (name IN varchar2, value OUT varchar2) is a procedure. FND_PROFILE.VALUE (name IN varchar2) return varchar2 is a function. Syntax of referring a profile option value in value sets or concurrent program parameters is

    :$PROFILES$.option_name Seeded profiles are

    USERNAME

    USER_ID RESP_ID

    SELECT* FROMFND_APPLICATION_VLWHERE1=1

    ANDAPPLICATION_NAME ='XXCUST Custom Application'

    SELECT* FROMFND_RESPONSIBILITY_VLWHERE1=1ANDRESPONSIBILITY_NAME ='Receivables, Vision Operations (USA)'

    SELECT* FROMfnd_request_groupsWHERE1=1ANDrequest_group_name like'Receivables All'

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    56/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    /*==========================PACKAGE SPECIFICATION===========================*/CREATEORREPLACEPACKAGEapps.xxaa_fnd_concprg_registrationAS

    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);

    PROCEDURExxaa_fnd_concprg_executable;

    PROCEDURExxaa_fnd_concprg_define;

    PROCEDURExxaa_fnd_concprg_parameter;

    PROCEDURExxaa_fnd_concprg_addtogroup;

    PROCEDURExxaa_fnd_concprg_submit;

    PROCEDURExxaa_fnd_concprg_wait_request;

    PROCEDURExxaa_fnd_concprg_main;END;/

    /*==========================PACKAGE BODY===========================*/CREATEORREPLACEPACKAGEBODYapps.xxaa_fnd_concprg_registrationAS/*Author : Raju ChCreated_Date :Last_Update_by :Last_Updated_Date :Purpose : Used Register Concurrent Program into apps (bycreating Executable, Define and Submit the Concurrent Program)*/

    ----->>>=======================================================

    PROCEDURExxaa_fnd_concprg_executableISBEGIN

    SELECTCOUNT(*)INTOv_execFROMfnd_executables

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    57/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    WHEREexecutable_name =v_executable;

    IFv_exec =0THEN

    fnd_global.apps_initialize (user_id =>1318,resp_id =>21623,resp_appl_id =>660

    );

    fnd_program.executable (executable =>v_executable,application =>v_application,short_name =>v_executable,execution_method =>'Oracle Reports',execution_file_name =>v_executable

    );COMMIT;DBMS_OUTPUT.put_line( 'succeefully created executable name is

    '|| v_executable );

    ELSEDBMS_OUTPUT.put_line( 'this executable '|| v_executable ||'is already created');

    ENDIF;EXCEPTION

    WHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);ENDxxaa_fnd_concprg_executable;

    ----->>>=======================================================

    PROCEDURExxaa_fnd_concprg_defineISBEGIN

    SELECTCOUNT(*)INTOv_execFROMfnd_executablesWHEREexecutable_name =v_executable;

    IFv_exec =1THEN

    --DBMS_OUTPUT.PUT_LINE ('succeefully created executable name is

    '||V_EXECUTABLE) ;SELECTCOUNT(*)INTOv_cpFROMfnd_concurrent_programsWHEREconcurrent_program_name =v_cprogram;

    IFv_cp =0THEN

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    58/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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 );

    ELSEDBMS_OUTPUT.put_line( 'concurrent program is not created'|| SQLCODE|| SQLERRM);

    ENDIF;ELSE

    DBMS_OUTPUT.put_line( 'this executable'|| v_executable || 'is not created ');

    ENDIF;EXCEPTION

    WHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);ENDxxaa_fnd_concprg_define;

    ----->>>=======================================================

    PROCEDURExxaa_fnd_concprg_parameterISBEGIN

    SELECTCOUNT(*)INTOv_cpFROMfnd_concurrent_programsWHEREconcurrent_program_name =v_cprogram;

    IFv_cp =1THEN

    BEGIN--DBMS_OUTPUT.PUT_LINE ('succeefully created concurrent

    program '||V_EXECUTABLE) ;fnd_global.apps_initialize (user_id =>1318,

    resp_id =>21623,

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    59/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    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);

    EXCEPTIONWHENOTHERSTHEN

    DBMS_OUTPUT.put_line('ERROR OUT HERE'|| SQLCODE||SQLERRM);

    END;

    BEGINfnd_program.parameter

    (program_short_name =>v_cprogram,application =>v_application,SEQUENCE =>20,parameter =>'Date To',enabled =>'Y',value_set =>'240 char',display_size =>50,description_size =>20,concatenated_description_size =>20,prompt =>'Date To',token =>'P_DATE_TO'

    );COMMIT;DBMS_OUTPUT.put_line('successfully created parameter for

    concurrent program '|| v_cprogram );EXCEPTION

    WHENOTHERSTHEN

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    60/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE||SQLERRM);

    END;ELSE

    DBMS_OUTPUT.put_line('concurrent program '|| v_cprogram || ' isnot created');

    ENDIF;

    EXCEPTIONWHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);ENDxxaa_fnd_concprg_parameter;

    ----->>>=======================================================

    PROCEDURExxaa_fnd_concprg_addtogroupISBEGIN

    SELECTCOUNT(*)INTOv_cpFROMfnd_concurrent_programsWHEREconcurrent_program_name =v_cprogram;

    IFv_cp =1THEN

    BEGINfnd_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 requestgroup');

    EXCEPTION

    WHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE||SQLERRM);

    END;ELSE

    DBMS_OUTPUT.put_line( 'concurrent program '|| v_cprogram || 'IS NOT CREATED');

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    61/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    ENDIF;EXCEPTION

    WHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);ENDxxaa_fnd_concprg_addtogroup;

    ----->>>=======================================================

    PROCEDURExxaa_fnd_concprg_submitISBEGIN

    BEGINfnd_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

    WHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);END;

    EXCEPTIONWHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE|| SQLERRM);ENDxxaa_fnd_concprg_submit;

    ----->>>=======================================================

    PROCEDURExxaa_fnd_concprg_wait_requestIS

    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);v_b BOOLEAN;

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    62/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    BEGINSELECTCOUNT(*)INTOv_req_id2FROMfnd_concurrent_requestsWHERErequest_id =v_req_id;

    IFv_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;

    EXCEPTIONWHENOTHERSTHEN

    DBMS_OUTPUT.put_line('error out here'|| SQLCODE||SQLERRM);

    END;

    IFv_phase ='Completed'ANDv_status ='Normal'THEN

    DBMS_OUTPUT.put_line(v_req_id || ' Sucessfully Completed WithStatus Normal');

    ELSIFv_phase ='Completed'ANDv_status ='Error'THEN

    DBMS_OUTPUT.put_line(v_req_id || ' Sucessfully Completed WithStatus Error');

    ELSIFv_phase ='Completed'ANDv_status ='Warning'THEN

    DBMS_OUTPUT.put_line(v_req_id || ' Sucessfully Completed WithStatus Warning');

    mailto:[email protected]://oracleapps88.blogspot.com/https://www.facebook.com/OracleApplications
  • 7/25/2019 AOL Oracle Application Object Library Training Manual

    63/63

    AOL Oracle Application Object Library Training Manual Raju Chinthapatla

    ELSEDBMS_OUTPUT.put_line(v_req_id || v_phase || ' '|| v_status);

    ENDIF;ELSE

    DBMS_OUTPUT.put_line('ERROR FOR SUBMITION THE REQUEST. REQUESTID IS '|| v_req_id );

    ENDIF;ENDxxaa_fnd_concprg_wait_request;

    ----->>>=======================================================

    PROCEDURExxaa_fnd_concprg_mainISBEGIN

    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;

    EXCEPTIONWHENOTHERSTHEN

    DBMS_OUTPUT.put_line('ERROR OUT HERE'|| SQLCODE|| SQLERRM);ENDxxaa_fnd_concprg_main;

    ----->>>=======================================================

    ENDxxaa_fnd_concprg_registration;/