Creating Concurrent Programs

Nov. 16, 2020 pexels-pixabay-35888.jpg Vuong Huynh

This note is taken from Oracle E-Business Suite R12 Core Development and Extension Cookbook by Andy Penver

  • Application Developer responsibility is needed to define Concurrent Program (C.P.)
  • System Administrator will help giving access to users
  • We can launch concurrent programs through an online request, for it to be scheduled automatically or to be triggered programmatically by using Oracle's built-in APIs
  • Concurrent programs can also be configured so that they can be made incompatible with other concurrent programs meaning that they cannot run simultaneously.
  • We can also group concurrent programs together and form a request set. This feature is useful if you need to create concurrent programs that are linked in some way but need to be run in a certain manner.
  • Concurrent programs can also be scheduled to run on a certain date or to be run on an ongoing basis indefinitely.


Defining a Concurrent Program (C.P.)

Introducing Concurrent Program:
  • Oracle Reports: launch Oracle reports
  • PL/SQL stored procedures (two mandatory parameters: errbuf and retcode)
  • Host script: launch a shell scripts
  • Immediate: launch a subroutine.
  • Java stored procedures: executable written using Java
  • Multi-Language Function: MLS functions used for running programs in multiple languages.
  • SQL *Loader: load bulk data into EBS. (data file, control file, and parameter file)
  • SQL *Plus: run SQL *Plus script or anonymous block.
  • Spawned: run on the operating system.
  • Perl Concurrent Program: executing programs written in CGI Perl (CGI: Common Gateway Interface)

Executable file location:
  • AP_TOP/bin: Payables applications
  • AR_TOP/bin: Receivables application
  • XXHR_TOP/sql: custom application top directory
  • INV_TOP/Reports/Lang: Inventory application

Output and log files:

The location of log files can be found by querying the FND_CONCURRENT_REQUESTS table. The two columns you are looking for are logfile_name and outfile_name:

SELECT logfile_name, outfile_name 
FROM FND_CONCURRENT_REQUESTS 
WHERE request_id = <request_id>

Register a custom application
:

When we define a custom application, we register the custom application name, application short name, application basepath, and application description with the Oracle Application Object Library.

  1. Log in to Oracle with the System Administrator responsibility
  2. Navigate to Application >> Register to open the Applications window
  3. Enter:
  • Application: XXHR Custom Application
  • Short Name: XXHR
  • Basepath: XXHR_TOP
  • Description: XXHR Custom Application

Save the input

Configure an executable:

  1. Log in to Oracle with the Application Developer responsibility.
  2. Navigate to Concurrent >> Executable to open the Concurrent Program Executable window
  3. Enter:
  • Executable: XXHR1001
  • Short Name: XXHR1001
  • Application: XXHR Custom Application
  • Description: Executable created for concurrent program recipe
  • Execution Method: PL/SQL Stored Procedure
  • Execution File Name: xxhreebs.first_concurrent_program

Save and exit the form


Configure the concurrent program
:
  1. Log in to Oracle and select the Application Developer responsibility
  2. Navigate to Concurrent >> Program to open the Concurrent Programs window
  3. Enter:
  • Program: XXHR First Concurrent Program
  • Short name: XXHR_FIRST_CONC_PROG
  • Application: XXHR Custom Application
  • Description: XXHR First Concurrent Program
  • Executable Name: XXHR1001

Save and exit the form

Look at the Executable Name: XXHR1001. It is the Short name of configuring the executable above.


Making a concurrent program available to a user

The concurrent program needs to be assigned to a request group and the request group needs to be assigned to a responsibility. The responsibility will have a menu that calls the concurrent request functions.


Configure a menu:
  1. Log in to Oracle with the Application Developer responsibility.
  2. Navigate to Application >> Menu to open the Menus window
  3. Enter:
  • Menu: XXHR_TEST_MENU
  • User Menu Name: Test Menu
  • Menu Type: Standard
  • Description: Test Menu
  • Enter data for the detailed records:
Seq Promt Submenu Function Description Grant
10 View Requests View All Concurrent Requests View Requests
20 Submit Requests Requests: Submit Submit Requests

Save and exit the form.

We can view the structure of the Menu we have just created by clicking the View Tree button from the Menus screen.


Create a new request group:
  1. Log in to Oracle with the System Administrator responsibility
  2. Navigate to Security >> Responsibility >> Request to open the Request Groups window
  3. Enter:
  • Group: XXHR Request Group
  • Application: XXHR Custom Application
  • Code: XXHT_REQUEST_GROUP
  • Description: XXHR Request Group
  • Add the concurrent program we created as below:
Type Name Application
Program XXHR First Concurrent Program XXHR Custom Application

Save and exit the form


Create a new Responsibility:
  1. Log in to Oracle with the System Administrator responsibility
  2. Navigate to Security >> Responsibility >> Define to open the Responsibilities window
  3. Enter:
  • Responsibility Name: XXEBS Extending e-Business Suite
  • Application: XXHR Custom Application
  • Responsibility Key: XXEBSEEBS
  • Description: XXEBS Extending e-Business Suite
  • Data Group - Name: Standard
  • Data Group - Application: XXHR Custom Application
  • Menu: Test Menu
  • Request Group - Name: XXHR Request Group

Save and exit


Assign the responsibility to a user:
  1. Log in to Oracle with the System Administrator responsibility
  2. Navigate to Security >> User >> Define and open the Users window
  3. Create new user or F11 >> CTRL + F11 to find old user
  4. In the Direct Responsibilities tab, add XXEBS Extending e-Business Suite to the responsibility field

Save and exit


Run the concurrent program:
  1. Log in to Oracle with the user that has the XXEBS Extending e-Business Suite responsibility assigned to it
  2. Navigate to Submit Requests >> Submit to open the Submit a New Request window
  3. Select Single Request and click the OK button to open the Submit Request screen
  4. Click on the Name field and select XXHR First Concurrent Program from the list of values.
  5. Click on the Submit button
  6. A decision box will appear informing us that the request has been submitted.
  7. Click on the No button as we do not wish to submit another request at this time
  8. Exit the form.

View the request:
  1. Navigate to View >> Requests the top menu to open the Find Requests
  2. Make sure the All My Requests field is chosen.
  3. Click Find and the Requests window will appear and show the concurrent program executed.

Note that the Requests screen does not automatically refresh so you will need to click on the Refresh Data button to refresh the screen until the Phase has changed to Completed