- Objective
The objective of this document is to explain the process of invoking an Oracle EBS Concurrent Program from the Oracle APEX application using a PL/SQL procedure for report generation.
- Overview
Oracle EBS provides the FND_REQUEST.SUBMIT_REQUEST API to submit concurrent programs from PL/SQL. This approach is commonly used to automate report generation and background processing.
- Prerequisites
- Concurrent Program is registered.
- Executable is created.
- Responsibility has access to the concurrent program.
- Required parameters are available.
- APPS context is initialized (when executing outside the EBS forms/concurrent environment).
- Process Flow
- Initialize the application context (if required).
- Call FND_REQUEST.SUBMIT_REQUEST.
- Pass the required parameters.
- Submit the request.
- Commit the transaction.
- Verify the request in the Concurrent Requests form.
- Sample PL/SQL Code
SET SERVEROUTPUT ON;
CREATE OR REPLACE PROCEDURE APPS.XXXXX_REF_DOC_CALL_CONC_PROG
(
p_ref_doc_id IN VARCHAR2,
p_sterlite_lot_no IN VARCHAR2,
p_request_id OUT NUMBER — OUT PARAMETER ADDED
)
IS
l_user_id NUMBER := 7777;
l_resp_id NUMBER := 20560;
l_resp_appl_id NUMBER := 706;
l_layout BOOLEAN;
l_program_short_name VARCHAR2(30) := ‘XXXXREFDOC’;
l_program_appl_short_name VARCHAR2(50) := ‘ABC’;
BEGIN
— Initialize Apps Context
APPS.FND_GLOBAL.APPS_INITIALIZE(
user_id => l_user_id,
resp_id => l_resp_id,
resp_appl_id => l_resp_appl_id
);
— Set Layout
l_layout := APPS.FND_REQUEST.ADD_LAYOUT
(
template_appl_name => ‘ABC’,
template_code => p_ref_doc_id,
template_language => ‘en’,
template_territory => ‘US’,
output_format => ‘PDF’
);
— Submit Concurrent Request
p_request_id := APPS.FND_REQUEST.SUBMIT_REQUEST(
application => l_program_appl_short_name,
program => l_program_short_name,
description => ‘Submitted from Procedure’,
start_time => NULL,
sub_request => FALSE,
argument1 => p_ref_doc_id,
argument2 => p_sterlite_lot_no
);
COMMIT;
IF p_request_id = 0 THEN
DBMS_OUTPUT.PUT_LINE (‘Request Failed: ‘ || APPS.FND_MESSAGE.GET);
ELSE
DBMS_OUTPUT.PUT_LINE (‘Request Submitted Successfully. Request ID: ‘ || p_request_id);
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE (‘Error: ‘ || SQLERRM);
END XXXX_REF_DOC_CALL_CONC_PROG;
/
- Validation
- Navigate to View → Requests.
- Search using the Request ID.
- Verify that the request completes successfully.
- Validate the generated Reference Document report.
- Benefits
- Automates report generation.
- Reduces manual effort.
- Enables scheduling through the Concurrent Manager.
- Improves consistency and traceability.
- Conclusion
Using FND_REQUEST.SUBMIT_REQUEST provides a standard and efficient way to execute concurrent programs programmatically in Oracle EBS.