Home Discussions Questions & Answers Debugging Form Assignment Parameter Retrieval

Debugging Form Assignment Parameter Retrieval

Avatar photoCustomer November 22, 2023 at 2:07 pm

I am configuring a form assignment to launch a report from the Purchasing RFQ form. I need to pass the RFQ Number from the header block and the RFQ Line Number from the line block to my report. How is the PL/SQL structure defined to conditionally pass multiple parameters depending on if the line block has data?

Viewing 6 reply threads
  • Author
    Replies
    • Support November 23, 2023 at 6:27 am  

      The PL/SQL logic, typically executed in a `when-button-pressed` trigger on the EBS form, uses the `XXEN_API.CREATE_RUN_ID_` function to start a report instance, followed by conditional calls to `XXEN_API.SET_PARAMETER_VALUE_` , . For instance, you first check if the RFQ Header field is populated (`:rfq_header.rfq_number is not null`) before setting that parameter . Then, a nested condition checks if the line number is available (`:rfq_line.rfq_line_number is not null`) before setting the second parameter value , .

    • Avatar photoCustomer November 24, 2023 at 12:47 am  

      How do I ensure the final output file is downloaded automatically to the user’s desktop when using this direct PL/SQL approach from a custom form button?

    • Support November 24, 2023 at 7:39 am  

      To trigger the file download, the PL/SQL procedure must call `XXEN_UTILS.DOWNLOAD_FILE` . This function requires the file ID, which is retrieved using `XXEN_API.REPORT_FILE_ID(l_run_id)` . Note that to use this functionality within a custom Oracle Form, you must ensure the `XXEN.pll` library is attached to your custom form , as `XXEN_UTILS.DOWNLOAD_FILE` is contained within it .

    • Avatar photoCustomer November 25, 2023 at 12:15 am  

      If I am unsure of the exact form block or item name (e.g., if it’s `rfq_header.rfq_number` or something else), how can I reliably identify the correct reference name in the EBS form?

    • Support November 26, 2023 at 3:15 pm  

      The most reliable way to identify the correct Form Name and Block Name is through the standard Oracle Forms interface . You navigate to the target form, go to the top menu, and select Help > About Oracle Applications > Current Form . This window provides the necessary Form Name and typically enough context to determine the Block and Item names for parameter referencing .

    • Avatar photoCustomer November 26, 2023 at 10:59 pm  

      Is there a mechanism to pass runtime options, like selecting a specific layout template, in addition to the report parameters when running via PL/SQL API?

    • Support November 27, 2023 at 6:41 am  

      Yes, runtime options such as the template name can be set using the `XXEN_API.SET_RUNTIME_OPTION` procedure . You specify the option name (e.g., `’TEMPLATE_NAME’`) and the desired value . You can even set the value dynamically, for instance, by calling `XXEN_API.DEFAULT_TEMPLATE_` to retrieve the user’s default template for that report before executing .

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

Login with: