Developer ToolsFree generatorPDF, Excel, Word exportOracle E-Business SuiteAll Oracle E-Business Suite tools

Oracle EBS FND_REQUEST.SUBMIT_REQUEST Code Generator

This generator writes the PL/SQL block that submits an Oracle E-Business Suite concurrent request from the database: apps context, operating unit, optional XML Publisher layout, SUBMIT_REQUEST, COMMIT and an optional WAIT_FOR_REQUEST loop. It targets EBS 12.1 and 12.2 and runs in SQL*Plus or SQL Developer as APPS.

Fill in

SELECT user_id FROM fnd_user WHERE user_name = 'YOURUSER'

From FND_RESPONSIBILITY_VL. The responsibility's request group must contain the program.

FND_RESPONSIBILITY_VL.APPLICATION_ID for that responsibility.

Used by MO_GLOBAL.SET_POLICY_CONTEXT and FND_REQUEST.SET_ORG_ID. Delete those two lines for programs that are not multi-org.

FND_CONCURRENT_PROGRAMS.CONCURRENT_PROGRAM_NAME, not the user-visible name.

Format DD-MON-YYYY HH24:MI:SS, for example 23-OCT-2026 02:00:00. Blank becomes NULL, which means run immediately.

Quote literals. Use CHR(0) for unused arguments; everything after the first CHR(0) is ignored.

Delete the ADD_LAYOUT block if the program has no XML Publisher template.

Generated code
Download:

Submit a concurrent request and optionally wait

SET SERVEROUTPUT ON
DECLARE
  l_req_id      NUMBER;
  l_layout_ok   BOOLEAN;
  l_done        BOOLEAN;
  l_phase       VARCHAR2(80);
  l_status      VARCHAR2(80);
  l_dev_phase   VARCHAR2(30);
  l_dev_status  VARCHAR2(30);
  l_message     VARCHAR2(2000);
BEGIN
  -- 1. Apps context: user, responsibility, responsibility application
  FND_GLOBAL.APPS_INITIALIZE(1318, 20420, 1);

  -- 2. Operating unit (delete both lines for programs that are not multi-org)
  MO_GLOBAL.SET_POLICY_CONTEXT('S', 204);
  FND_REQUEST.SET_ORG_ID(204);

  -- 3. XML Publisher layout (delete this block if the program has no template)
  l_layout_ok := FND_REQUEST.ADD_LAYOUT('XXCUST', 'XX_OPEN_ORDERS_CSV', 'en', 'US', 'PDF');
  IF NOT l_layout_ok THEN
    RAISE_APPLICATION_ERROR(-20001, 'ADD_LAYOUT failed: ' || FND_MESSAGE.GET);
  END IF;

  -- 4. Submit. Arguments are positional VARCHAR2 values in the order of the program parameters.
  l_req_id := FND_REQUEST.SUBMIT_REQUEST(
                application => 'XXCUST',
                program     => 'XX_OPEN_ORDERS_CSV',
                description => 'Submitted from PL/SQL',
                start_time  => '[Start time (blank = now)]',
                sub_request => FALSE,
                argument1   => '204',
                argument2   => FND_DATE.DATE_TO_CANONICAL(TRUNC(SYSDATE)),
                argument3   => 'Y',
                argument4   => CHR(0),
                argument5   => CHR(0),
                argument6   => CHR(0));

  IF l_req_id = 0 THEN
    l_message := FND_MESSAGE.GET;
    ROLLBACK;
    RAISE_APPLICATION_ERROR(-20002, 'SUBMIT_REQUEST failed: ' || l_message);
  END IF;

  -- 5. COMMIT is required: the managers only see the FND_CONCURRENT_REQUESTS row after commit
  COMMIT;
  DBMS_OUTPUT.PUT_LINE('Request ID: ' || l_req_id);

  -- 6. Optional wait
  IF 'Y' = 'Y' THEN
    l_done := FND_CONCURRENT.WAIT_FOR_REQUEST(
                request_id => l_req_id,
                interval   => 15,
                max_wait   => 1800,
                phase      => l_phase,
                status     => l_status,
                dev_phase  => l_dev_phase,
                dev_status => l_dev_status,
                message    => l_message);
    DBMS_OUTPUT.PUT_LINE('Phase/Status: ' || l_phase || ' / ' || l_status);
    DBMS_OUTPUT.PUT_LINE('Dev phase/status: ' || l_dev_phase || ' / ' || l_dev_status);
    IF NOT l_done THEN
      DBMS_OUTPUT.PUT_LINE('Stopped waiting before completion: ' || l_message);
    ELSIF l_dev_status <> 'NORMAL' THEN
      DBMS_OUTPUT.PUT_LINE('Completed with ' || l_dev_status || ': ' || l_message);
    END IF;
  END IF;
END;
/

Journal Import (SQLGL / GLLEZL): confirm the parameter order first

-- Lists the Journal Import parameters in submission order on YOUR instance.
-- The argumentN positions in the block below must follow column_seq_num order.
SELECT u.column_seq_num,
       u.end_user_column_name,
       u.form_left_prompt,
       u.required_flag,
       u.default_value
FROM   fnd_descr_flex_col_usage_vl u
WHERE  u.application_id = (SELECT application_id FROM fnd_application WHERE application_short_name = 'SQLGL')
AND    u.descriptive_flexfield_name = '$SRS$.GLLEZL'
ORDER  BY u.column_seq_num;

-- Example only: verify for your release against the query above before use.
-- l_run_id is GL_INTERFACE_CONTROL.INTERFACE_RUN_ID for your source and group.
-- l_access_set_id is the data access set (profile GL: Data Access Set, GL_ACCESS_SET_ID).
-- l_req_id := FND_REQUEST.SUBMIT_REQUEST(
--               application => 'SQLGL',
--               program     => 'GLLEZL',
--               description => NULL,
--               start_time  => NULL,
--               sub_request => FALSE,
--               argument1   => TO_CHAR(l_run_id),         -- interface run id (verify)
--               argument2   => TO_CHAR(l_access_set_id),  -- data access set id (verify)
--               argument3   => 'N',                       -- post errors to suspense (verify)
--               argument4   => NULL,                      -- start date (verify)
--               argument5   => NULL,                      -- end date (verify)
--               argument6   => 'N',                       -- create summary journals (verify)
--               argument7   => 'N');                      -- import descriptive flexfields (verify)
-- COMMIT;

Verify on your instance: the program short name and application in FND_CONCURRENT_PROGRAMS_VL, that the responsibility's request group contains the program, the parameter order from the $SRS$ query, and the ADD_LAYOUT template code in XDO_TEMPLATES_B. FND_REQUEST.SET_ORG_ID exists in R12; on 11i remove it. The GLLEZL argument list is an unverified example: build it from the parameter query.

Get your submission code reviewed

Send us the program definition and your block; we check argument order, layout and wait logic against your 12.1 or 12.2 instance conventions.

Optional. The tool and every export work without this. No spam.

Was this tool useful?

How to use it

Enter the USER_ID, RESPONSIBILITY_ID and responsibility APPLICATION_ID the request should run under. The responsibility matters: SUBMIT_REQUEST returns 0 if the program is not in that responsibility's request group. Enter the program application short name and program short name (CONCURRENT_PROGRAM_NAME), then the arguments. Arguments are inserted as PL/SQL expressions, so quote literals ('204'), call functions for dates, and put CHR(0) in every slot after the last real parameter. Fill the layout fields only if the program has an XML Publisher template; otherwise delete that block. Choose whether to wait, then copy the code.

  • Find IDs: SELECT responsibility_id, application_id FROM fnd_responsibility_vl WHERE responsibility_name = '...'
  • Program short name: FND_CONCURRENT_PROGRAMS_VL.CONCURRENT_PROGRAM_NAME
  • Parameter order: the $SRS$ query in the second block, pointed at your program
  • Run as APPS or a schema with execute on FND_REQUEST and FND_CONCURRENT

What each call does

FND_GLOBAL.APPS_INITIALIZE sets the user, responsibility and application so the request is owned by a real user and picks up profile values. MO_GLOBAL.SET_POLICY_CONTEXT('S', org_id) and FND_REQUEST.SET_ORG_ID set the operating unit for multi-org programs. FND_REQUEST.ADD_LAYOUT attaches the template and output format and returns a BOOLEAN; it must be called before SUBMIT_REQUEST. SUBMIT_REQUEST returns the request ID, or 0 on failure with the reason on the message stack (read it with FND_MESSAGE.GET). It only inserts the request: nothing runs until you COMMIT. FND_CONCURRENT.WAIT_FOR_REQUEST polls every interval seconds up to max_wait and returns phase, status and the language-independent dev_phase and dev_status (COMPLETE with NORMAL, WARNING or ERROR).

Worked example and checking the result

With the defaults, the block runs a custom XX_OPEN_ORDERS_CSV program for org 204, passes a canonical date in argument2 and waits up to 30 minutes, polling every 15 seconds. In SQL*Plus you see the request ID and the final dev phase and status. Check the row in the system with SELECT request_id, phase_code, status_code, argument_text, logfile_name, outfile_name FROM fnd_concurrent_requests WHERE request_id = :id. ARGUMENT_TEXT shows exactly what the manager received, which is the quickest way to spot a shifted argument. Which manager runs it depends on manager specialization rules and the program's request type, not on this code; a request in Pending/Standby is usually held by an incompatibility, while Inactive/No Manager means no running manager is specialised to run it.

Gotchas

Arguments are strings. Dates must be canonical (FND_DATE.DATE_TO_CANONICAL gives YYYY/MM/DD HH24:MI:SS), and value-set validated parameters expect the stored value, not the displayed meaning. Never put a default-NULL argument between real ones: an empty string is a NULL value, while CHR(0) marks the end of the list. Calling SUBMIT_REQUEST inside a running concurrent program with sub_request TRUE needs FND_CONC_GLOBAL.SET_REQ_GLOBALS and the parent pause pattern, which this block does not cover. Do not call WAIT_FOR_REQUEST from inside a request that the same manager queue must run, or you can deadlock the queue.

Frequently Asked Questions

Why does FND_REQUEST.SUBMIT_REQUEST return 0?

Usually the apps context is missing or wrong, the program is not in the responsibility's request group, the program or application short name is misspelt, or the program is disabled. Read FND_MESSAGE.GET straight after the call: it holds the reason. Also check that APPS_INITIALIZE was given the responsibility's own APPLICATION_ID, not the program's.

Why is my request not running after SUBMIT_REQUEST?

The request is only an inserted row until you COMMIT, so the managers cannot see it. After commit, a request in Pending/Standby is waiting on an incompatibility, and Inactive/No Manager means no active manager is specialised to run that program. Check the Concurrent Managers form or the phase-status reference.

How do I schedule a concurrent program in Oracle Apps from PL/SQL?

Pass start_time as a string in DD-MON-YYYY HH24:MI:SS format for a one-off future run. For repeating schedules, call FND_REQUEST.SET_REPEAT_OPTIONS before SUBMIT_REQUEST, or define the schedule from the Submit Request window, which is easier to maintain and visible to support staff.

How do I pass a date parameter?

Use FND_DATE.DATE_TO_CANONICAL(your_date), which produces YYYY/MM/DD HH24:MI:SS, the format FND_STANDARD_DATE and most seeded date value sets expect. Passing TO_CHAR with a session NLS format is the most common cause of invalid date errors in the request log.

If you want planners and accountants to start and check EBS requests by asking in plain English on your own servers, we can set that up with read-only defaults and human approval on submissions.

ArchRay builder
Design the on-prem AI stack for Oracle E-Business Suite: model, GPUs, RAG pipeline, guardrails
See memory, speed and cost as you swap parts, then export the diagram. Free, in your browser.
Open the builder

Keep exploring

Free tools

ERP fixes and how-tos

Runs with your ERP

AI on your ERP

Integrations

Software