Author

Name:

Ramaiah

E-mail:

yadlapalliramaiah@gmail.com

Concurrent Program Registration Scripts

The scripts in this article can be used to:
1)Register the executable and Program
2)Attach Concurrent program to a Request Group
3)Submit Concurrent program

The scripts in this article can be used to:

1)    Register the executable and Program

2)    Attach Concurrent program to a Request Group

3)    Submit Concurrent program

 

1)    Registering the Executable from back end

          Usually we create executable in the front-end, but this can be done from the database tier i.e. back-end too.

          Below is the PL/SQL code to create an executable from back-end.

         BEGIN

              FND_PROGRAM.executable('XXMZ_ERPSCHOOLS_EMPLOYEE' -- executable

                                                              , 'XXMZ Custom' -- application

                                                              , 'XXMZ_ERPSCHOOLS_EMPLOYEE' -- short_name

                                                              , 'Executable for ERPSCHOOLS Employee INFORMATION' -- description

                                                              , 'PL/SQL Stored Procedure' -- execution_method

                                                              , 'XXMZ_ERPSCHOOLS_EMPLOYEE' -- execution_file_name

                                                              , '' -- subroutine_name

                                                              , '' -- Execution File Path

                                                              , 'US' -- language_code

                                                              , '');

             COMMIT;

         END;


       Query in the front-end to see whether your executable is created or not.


2)    Registering the Concurrent program from back end

            Usually we create Concurrent program in the front-end, but this can be done from the database tier too.

            Below is the program to create a Concurrent program from back-end.

            BEGIN

                     FND_PROGRAM.register('Concurrent program for ErpSchools Employee Information' -- program

                                                                , 'XXMZ Custom' -- application

                                                                , 'Y' -- enabled

                                                                , 'XXMZ_ERPSCHOOLS_EMPLOYEE' -- short_name

                                                                , 'ErpSchools Employee Information' -- description

                                                                , 'XXMZ_ERPSCHOOLS_EMPLOYEE' -- executable_short_name

                                                                , 'XXMZ Custom' -- executable_application

                                                                , '' -- execution_options

                                                                , '' -- priority

                                                                , 'Y' -- save_output

                                                                , 'Y' -- print

                                                                , '' -- cols

                                                                , '' -- rows

                                                                , '' -- style

                                                                , 'N' -- style_required

                                                                , '' -- printer

                                                                , '' -- request_type

                                                                , '' -- request_type_application

                                                                , 'Y' -- use_in_srs

                                                                , 'N' -- allow_disabled_values

                                                                , 'N' -- run_alone

                                                                , 'TEXT' output_type

                                                                , 'N' -- enable_trace

                                                                , 'Y' -- restart

                                                                , 'Y' -- nls_compliant

                                                                , '' -- icon_name

                                                                , 'US'); -- language_code

                        COMMIT;

            END;


            Query in the front-end to see whether your Concurrent program is created or not.


3)    Attaching the concurrent program to the request group

               Usually we Attach Concurrent program to the request group in the front-end, but this can be done from database tier too.

               Below is the program to Attach Concurrent program to the request group from back-end.

               BEGIN

                        FND_PROGRAM.add_to_group('XXMZ_ERPSCHOOLS_EMPLOYEE' -- program_short_name

                                                                             , 'XXMZ Custom' -- application

                                                                             , 'xxmz Request Group' -- Report Group Name

                                                                             , 'XXMZ'); -- Report Group Application

                        COMMIT;

              END;


              Query in the front-end to see whether your Concurrent program is Attached to Request Group or not.

4)    Submitting Concurrent Program from Back-end

We first need to initialize oracle applications session using

                        fnd_global.apps_initialize(user_id,responsibility_id,application_responsibility_id) and then run fnd_request.submit_request

                         DECLARE

                               l_request_id NUMBER(30);

                         begin

                                  FND_GLOBAL.APPS_INITIALIZE (user_id => 1318, resp_id => 59966, resp_appl_id => 20064);

                                  l_request_id:= FND_REQUEST.SUBMIT_REQUEST ('XXMZ' --Application Short name,

'VENDOR_FORM'-- Concurrent Program Short Name );

                                  DBMS_OUTPUT.PUT_LINE(l_request_id);

                                  commit;

                         end;

                  *****************************************************

To get the resp_id and resp_appl_id use the below queries.

                      --SELECT APPLICATION_ID, RESPONSIBILITY_ID

                          FROM FND_RESPONSIBILITY_TL

                          WHERE RESPONSIBILITY_NAME='xxmz Custom'

                       --SELECT USER_ID FROM FND_USER WHERE USER_NAME='OPERATIONS'

*****************************************************

Once the concurrent program is submitted from back-end, status of the concurrent program can be checked using below query.

                           SELECT * FROM FND_CONCURRENT_REQUESTS WHERE   REQUEST_ID=2766602

 

 
     

prudhvi

commented on 11/19/2009 4:22:12 PM

Ramaiah - It would be use full to have a piece of code to add parameters to the concurrent program and another piece of code to edit the concurrent program definition once it is created.

I wish to see these modifications.

Thanks
Prudhvi

   

Venkat

commented on 11/19/2009 9:37:26 PM

Hi - It is nice piece of information to the functional team as well, it helps a lot who is not aware of the technical.

   

Sarfraz Ahmad

commented on 11/19/2009 9:51:03 PM

Excellent information

   

Hussain K

commented on 11/19/2009 10:25:38 PM

Good information. But I support Ramaiah's Comments.

Thanks
Hussain K

   

P Pusp

commented on 11/19/2009 10:50:01 PM

Nothing new , but good try

   

Ramakrishna Reddy

commented on 11/19/2009 11:21:23 PM

Hi,

U done a great job.

Regards,
Ramakrishna

   

DhanaSurya

commented on 11/20/2009 1:10:53 AM

Excellent Work Ramaiah...Thank You for providing this.

   

Vijayakumar

commented on 11/20/2009 8:06:53 AM

Nice Presentation.Keep up the good work.A job well done.Thanks.

   

Sudham M

commented on 11/26/2009 9:29:30 AM

Very nice this who don't know this,
Hopes we can anynew things

Thanks
Sudham

   

Madhu

commented on 2/21/2010 9:13:15 AM

Is possible to see a result of Concurrent Program thorugh backend.

   

vinay sheel

commented on 4/24/2010 6:52:01 AM

nice but how to put the parameters in the report

   

sekhar

commented on 4/27/2010 8:12:19 AM

excellent

   

Mahesh

commented on 5/5/2010 9:08:14 PM

Good information. But I support Ramaiah's Comments.
Regard,
Mahesh Govindu

   

Mahesh

commented on 5/5/2010 9:08:24 PM

Good information. But I support Ramaiah's Comments.
Regard,
Mahesh Govindu

   

Mahesh

commented on 5/5/2010 9:08:26 PM

Good information. But I support Ramaiah's Comments.
Regard,
Mahesh Govindu

   

HARINATH

commented on 5/6/2010 2:32:45 PM

Very Good Information. Ramaiah's Comments is excellect.

Hairnath Reddy, Hyd

   

baba

commented on 5/9/2010 1:10:16 PM

hi,

above article is good but where i can find this code in apps.i want see the internal code for each application.
thanks in advance...

   

Poorna

commented on 6/4/2010 1:08:53 PM

Hi Ramaiah,

I came across your article "Concurrent Program Registration Steps" in erpschools.com website. It is a nice and useful article. Thanks for sharing it.

However, I've another request. I want to add a responsibility to a given user.

eg :- for the user 'OPERATIONS', I want to add responsibility 'US AR SUPER USER'. How can I add it programatically?

Thanks & Regards,
Poorna.

   
1
Comments Box

Name:

Email: