Home Discussions Questions & Answers PL/SQL API: Initializing a Report Run ID

PL/SQL API: Initializing a Report Run ID

Avatar photoCustomer August 30, 2021 at 9:35 am

I am preparing a custom PL/SQL procedure to execute a Blitz Report (`AP Suppliers`). What is the first required API call to initialize the environment and identify the specific report instance before setting any parameters?

Viewing 6 reply threads
  • Author
    Replies
    • Support August 30, 2021 at 10:02 pm  

      The absolute first step for any programmatic execution is to initialize the application context using `XXEN_REPORT.APPS_INITIALIZE`, passing the User Name, Responsibility Key, and Responsibility Application Short Code , , . Subsequently, you must create a unique instance identifier by calling `XXEN_API.CREATE_RUN_ID_`, passing the report name (e.g., `’AP Suppliers’`) . This function returns the essential `l_run_id`, which links all subsequent parameter and runtime option settings to this specific execution instance .

    • Avatar photoCustomer August 31, 2021 at 2:15 am  

      Once I have the Run ID, how do I set the parameter values, like setting the ‘Operating Unit’ to ‘Vision Operations’?

    • Support August 31, 2021 at 9:47 am  

      After obtaining the `l_run_id`, you use the procedure `XXEN_API.SET_PARAMETER_VALUE_` . This procedure is name-based, accepting the `p_parameter_name`, the `p_value` (the value to be passed), and the unique `p_run_id` . For example: `xxen_api.set_parameter_value_(p_parameter_name=>’Operating Unit’, p_value=>’Vision Operations’, p_run_id=>l_run_id)` , .

    • Avatar photoCustomer August 31, 2021 at 7:27 pm  

      The documentation mentions that `XXEN_API.CREATE_RUN_ID_` can be called either by ID or by name. When should I use the ID instead of the report name?

    • Support September 2, 2021 at 12:17 am  

      Both the `create_run_id_` and `set_parameter_value_` procedures support referencing objects by either their internal ID or their name , . Using the internal ID (e.g., `p_report_id` instead of `p_report_name`) is typically more robust in scenarios where report names might change or if your custom code already derives the internal report ID from a lookup table.

    • Avatar photoCustomer September 2, 2021 at 3:02 pm  

      If I am using the `FND_REQUEST.SUBMIT_REQUEST` API, do I still need to initialize the environment with `XXEN_REPORT.APPS_INITIALIZE`?

    • Support September 3, 2021 at 1:26 am  

      Yes, even when using the standard `fnd_request.submit_request` API to launch the Blitz Report concurrent program (`XXEN_REPORT`), the environment must be properly initialized . The call to `XXEN_REPORT.APPS_INITIALIZE` ensures the correct user, responsibility, and application context are established before the request is submitted , .

Viewing 6 reply threads
  • You must be logged in to reply to this post.

Login with: