This discussion is archived
8 Replies Latest reply: Nov 26, 2012 4:15 AM by rthampi RSS

How to call the concurrent program from oracle form button

Gurujothi Explorer
Currently Being Moderated
Hello Everyone,

I am working on Oracle forms 10g and Oracle Applications : 12.1.2,
already I have created one concurrent program(GRN Report) and which taking Receipt_number and org_id as parameters and its output format is .PDF .Its working fine.

Whenever the clients need the report they have to give correct concurrent program name then parameter values then refreshing and then by clicking the View Output button they are seeing the output.

Now what I want is from the form button (Named as Print Report) is it possible to call this concurrent program and when the button is clicked it has to be prompted for parameter values after giving all parameter values and by clicking SUBMIT/OK button it has to give the same output(.pdf) as like concurrent program.

can anyone tell me how to get this.

Thank You,

Regards,
Guru
  • 1. Re: How to call the concurrent program from oracle form button
    rthampi Explorer
    Currently Being Moderated
    Gurujothi wrote:
    Hello Everyone,

    I am working on Oracle forms 10g and Oracle Applications : 12.1.2,
    already I have created one concurrent program(GRN Report) and which taking Receipt_number and org_id as parameters and its output format is .PDF .Its working fine.

    Whenever the clients need the report they have to give correct concurrent program name then parameter values then refreshing and then by clicking the View Output button they are seeing the output.

    Now what I want is from the form button (Named as Print Report) is it possible to call this concurrent program and when the button is clicked it has to be prompted for parameter values after giving all parameter values and by clicking SUBMIT/OK button it has to give the same output(.pdf) as like concurrent program.

    can anyone tell me how to get this.

    Thank You,

    Regards,
    Guru
    It is possible, just prior providing you the "solution", would like to know on which form you are going to add this "print report" button
  • 2. Re: How to call the concurrent program from oracle form button
    Gurujothi Explorer
    Currently Being Moderated
    Hi Raj Thampi,

    Thank you for your reply,I have a custom form in APPS,here I want to create one button and by clicking this button I want to call the concurrent program.

    Thank you,

    Regards,
    Guru
  • 3. Re: How to call the concurrent program from oracle form button
    rthampi Explorer
    Currently Being Moderated
    Hi Guru

    check the following link

    http://tinyurl.com/cu6r4mo

    hope it helps

    regards,

    raj
  • 4. Re: How to call the concurrent program from oracle form button
    Gurujothi Explorer
    Currently Being Moderated
    Hi Raj,

    I have followed the link, everything works fine but am getting the output in XML format not in PDF.

    I put the following code in WHEN-BUTTON_PRESSED trigger,
    Declare
      l_ord_num               NUMBER := 0;
       l_ord_type_name         VARCHAR2 (240);
       l_req_id_Rep            NUMBER;
       l_request_completed     BOOLEAN := FALSE;
       l_req_phase             VARCHAR2 (20);
       l_req_status            VARCHAR2 (1000);
       l_req_dev_phase         VARCHAR2 (1000);
       l_req_dev_status        VARCHAR2 (1000);
       l_req_message           VARCHAR2 (1000);
       l_conc_mgr_status       NUMBER;
       p_call_stat             NUMBER;
       p_activep_stat          NUMBER;
       l_order_category_code   NUMBER;
       l_inv_report_name       VARCHAR2 (40):='XXRS_GRN_REPORT_VAT';
       l_ret_report_name       VARCHAR2 (40);
       l_req_id                                 NUMBER;
       l_order_type_name                VARCHAR2(30);
    Begin
      l_req_id :=
          fnd_request.submit_request ('XXRS',
                                      l_inv_report_name,
                                      NULL,
                                      SYSDATE,
                                      FALSE,
    
    /*You can pass a total of 100 parameters, just make sure to pass them in the same order you have defined them in the parameter session for the concurrent program*/
                                      :GRN_PARAMETER.BUSINESS_UNITS,:GRN_PARAMETER.GRN_NUMBER,                                   NULL,
                                      NULL
                                      --apps.fnd_profile.VALUE ('ORG_ID')
                                      );
    
    :SYSTEM.Message_Level := '25';
       COMMIT;
    
       l_request_completed :=
          fnd_concurrent.wait_for_request (request_id   => l_req_id,
                                           INTERVAL     => 1,
                                           phase        => l_req_phase,
                                           status       => l_req_status,
                                           dev_phase    => l_req_dev_phase,
                                           dev_status   => l_req_dev_status,
                                           MESSAGE      => l_req_message);
    
       :SYSTEM.Message_Level := '25';
       COMMIT;
    
    :SYSTEM.Message_Level := '0';
       editor_pkg.report (l_req_id, 'Y');
    
    /*for displaying the pdf automatically with a new window or tab after the concurrent request completes successfully*/
    END;
    Here where I have to mention for PDF output.

    Thank you.

    Regards,
    Guru

    Edited by: Gurujothi on 23 Nov, 2012 5:50 PM
  • 5. Re: How to call the concurrent program from oracle form button
    rthampi Explorer
    Currently Being Moderated
    Hi Guru
    you need to setup the output format with report itself :)
    As system administrator, edit the concurrent program output format to "pdf". Then the button click will automatically popup the .pdf output

    regards,

    raj
  • 6. Re: How to call the concurrent program from oracle form button
    Gurujothi Explorer
    Currently Being Moderated
    Hi Raj,

    thank you for your response, i put the following in my When-button-pressed trigger,
    Xxnh_Submit_Conc_Request_Pkg.p_submit_request( p_application  => 'XXRS',
                                                                                                               p_program            => 'XXRS_GRN_REPORT_VAT', 
    p_lang                     => 'US',
    p_xml                     => 'Y',
    p_temp_code      => 'XXRS_GRN_REPORT_VAT',
    p_arg1                    => :GRN_PARAMETER.BUSINESS_UNITS,
    p_arg2                    => :GRN_PARAMETER.GRN_NUMBER,
    p_arg3                    => NULL,
    p_arg4        =>Null);
    its working fine.

    Thank you.

    Regards,
    Guru
  • 7. Re: How to call the concurrent program from oracle form button
    Gurujothi Explorer
    Currently Being Moderated
    Hi Raj,

    Here in the generated pdf file the number field is showing different value,

    if MRP field is 1115.00 means it showing 1115n00
    and if 1000.00 means it showing 1000n00.

    I mean instead of .(dot) in number field it showing 'n'.

    but when I am running the concurrent program in VIEW==>Requests it showing fine i.e 1115.00

    What could be the reason??

    Regards,
    Guru.
  • 8. Re: How to call the concurrent program from oracle form button
    rthampi Explorer
    Currently Being Moderated
    Check the number formatting.

    regards,

    raj

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points