Thursday, 11 April 2024

AOL Objects Queries

 Functions

------------------

select * from fnd_form_functions;


select * from fnd_form_functions_t;


Menus

--------

select * from fnd_responsibility_tl

where responsibility_name='Application Deveoper';


select * from fnd_menus_vl


select * from fnd_menus;


select * from fnd_menus_tl;


select * from fnd_menu_entries;


select * from fnd_menu_entries_tl;


List of Menus Excluded from a given Responsibility:

-----------------------------------------------------

select  frv.responsibility_name,

        fmv.user_menu_name

from

        fnd_resp_functions frf,

        fnd_menus fmv,

        fnd_responsibility_vl frv

where

       frf.rule_type='M'

and frf.action_id= fmv.menu_id

and frf.responsibility_id = frv.responsibility_id

and frv.responsibility_name='&resp_name';


List of functions excluded from a given responsibility:

--------------------------------------------------------

select frv.responsibility_name,

       fffv.user_function_name

from

     fnd_resp_functions frf,

     fnd_form_functions_vl fffv,

     fnd_responsibility_vl frv

where

      frf.rule_type='F'

and frf.action_id = fffv.function_id

and frf.responsibility_id = frv.responsibility_id

and frv.responsibility_name='&resp_name';


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,

       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;


Create Concurrent Program Exceutable from Backend

-----------------------------------------------------

select * fnd_application_vl where 1=1 and application_short_name like 'XXCUST';


Decalre

v_executable varchar2(50):='XXCUSTREP';

begin

 fnd_global.apps_intialize(user_id =>1318,

                           resp_id => 21623,

                           resp_appl_id => 660);


 fnd_program.executable(executable => 'XXCUSTREP',

                        application => 'XXCUST Application',

                        short_name  => 'XXCUSTREP',

                        execution_method => 'Oracle Report',

                        execution_file_name => 'XXCUSTREP'

                        );

commit;

dbms_output.put_line('successfully created executable name' ||v_executable );


end;


select * from fnd_executables

where execution_file_name='XXCUSTREP';


Delete Concurrent Program Exceutable from Backend

-------------------------------------------------------

Decalre

v_executable varchar2(50):='XXCUSTREP';

begin


 fnd_program.delete_executable(executable_short_name => v_executable ,

                        application => 'XXCUST Application',                                              

                        );

commit;

dbms_output.put_line('successfully deleted executable name' ||v_executable );


end;


Create Concurrent Program from backend

------------------------------------------


declare

  v_name varchar2(50) := 'XXCUST Aging Report';

  V_short_name varchar2(50) := 'XXCUST_AGING';

begin

 fnd_global.apps_initialize(user_id => 1318,

                            resp_id => 21623,

                            resp_appl_id =>660

                           );

 fnd_program.register(program => v_name,

             application => 'XXCUST Application',

             enabled => 'Y',

             short_name => v_short_name,

             executable_short_name => v_short_name,

             executable_application => 'XXCUST Application',

             style => 'A4',

             output_type=> 'TEXT',

             use_in_srs => 'Y'

           );

Commit;


dbms_output.put_line('successfully created CP' || v_short_name);


end;


Checking

-------------

select * from fnd_concurrent_programs_vl 

where concurrent_program_name ='XXCUST_AGING';


---------------------------------------------------------------

Delete Concurrent Program from backend

--------------------------------------------


declare

  V_short_name varchar2(50) := 'XXCUST_AGING';

begin


 fnd_program.delete_program(

             application => 'XXCUST Application',

             program_short_name => v_short_name,            

           );

Commit;


dbms_output.put_line('successfully deleted CP' || v_short_name);


end;


Create Parameters to the concurrent program from Backend

-----------------------------------------------------------

declare

v_cprogram varchar2(50):= 'XXCUSR_AGING';

begin

fnd_global.apps_initialize(user_id => 1318,

                            resp_id => 21623,

                            resp_appl_id =>660

                           );


fnd_program.parameter(program_short_name => v_cprogram,

                       application => 'XXCUST Application',

                       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;

exception

when others then

dbms_output.put_line('error out here'||sqlcode ||sqlerrm);

end;


Delete parameters inthe concurrent program from Backend

-----------------------------------------------------------

decalre

v_short_name varchar2(50):= 'XXCUST_AGING';

begin

fnd_program.delete_parameter(program_short_name=>v_short_name,

                             application  => 'XXCUST Application',

                             parameter => 'P_DATE'

                           );

commit;

dbms_output.put_line('parameter deleted'||v_short_name);

end;


Define Request Group

-------------------------

select * from fnd_application_vl

where 1=1

and application_name='XXCUST Application';


select * from fnd_responsibility_vl

where 1=1

and responsibility_name='Receivables,Vision Operations(USA)';


select * from fnd_request_groups

where 1=1

and request_group_name like 'Receivables All';


Add Concurrent Program to the request group from backend

----------------------------------------------------------

declare

v_short_name varchar2(50):= 'XXCUST_AGING';

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

                         request_group => 'Receivables All',

                         group_application =>'Receivables'

                        );

commit;

dbms_output.put_line('attach CP 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.responsibilty_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.reuest_group_id

and fe.executabl_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 'XXCUST%'

order by 6,4,3,2;


------------------------------------------------------------------


Delete Concurrent Program from Request Group

----------------------------------------------

declare

v_short_name varchar2(50) := 'XXCUST_AGING';

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

                         request_group => 'Receivables All',

                         group_application =>'Receivables'

                        );

commit;

dbms_output.put_line('delete CP from request group'||v_short_name);  

end;


Concurrent Programs Assigned to a Request Group

------------------------------------------------------

select fcpv.concurrent_program_name short_name,

       fcpv.user_concurrent_program_name,

       frg.request_group_name

from

        fnd_concurrent_programs_vl fcpv,

        fnd_request_groups frg,

        fnd_request_group_units frgu

where 

       fcpv.concurrent_program_id = frgu.request_unit_id

and    fcpv.enabled_flag = 'Y'

and    frgu.request_group_id = frg.request_group_id

and    frg.request_group_name = '&request_group_name';


check if the CP is assigned to a given responsibility

--------------------------------------------------------


select fcpv.concurent_program_name,

       fcpv.user_concurrent_program_name,

       frg.request_group_name,

       fr.responsibility_name

from

      fnd_concurrent_programs_vl fcpv,

      fnd_request_groups frg,

      fnd_request_group_units frgu,

      fnd_responsibility_vl frv

where

      fcpv.concurrent_program_id = frgu.request_unit_id

and   fcpv.enable_flag='Y'

and   frgu.request_group_id = frg.request_group_id

and frv.responsibility_name = '&resp_name'

and fcpv.user_concurrent_program_name = '&conc_prg_name';


No comments:

Post a Comment