This discussion is archived
2 Replies Latest reply: Oct 24, 2013 3:43 AM by 886575 RSS

Unable to submit a java concurrent program from PLSQL

d43fc28c-f2cc-45ea-a96e-bbdfb8eca1f0 Newbie
Currently Being Moderated

Hi all,

 

I'm having some trouble getting a standard EBS java concurrent program to run from my code. The program is Create Printed Payment Instructions. Below is my code. I'm getting a 0 value for p_req_id. Any help would be appreciated

 

declare

  -- Local variables here

   G_USER_OPER               NUMBER := NULL; --see table fnd_user

  G_BATCH_AP_RESPONSIBILITY apps.fnd_responsibility_tl.responsibility_name%type;

  G_SQLAP CONSTANT VARCHAR2(10) := 'SQLAP';

  p_req_id number;

begin

  -- Test statements here

  SELECT s.user_id

    INTO G_USER_OPER

    FROM apps.FND_USER s

   WHERE s.user_name = 'BATCH_USER';

  SELECT s.responsibility_id

    INTO G_BATCH_AP_RESPONSIBILITY

    FROM apps.fnd_responsibility_tl s

   WHERE s.responsibility_name = 'AP SUPERVISOR'

     AND s.application_id = 200;

      

 

    

     apps.Fnd_Global.apps_initialize(G_USER_OPER, -- User_Id

                                    G_BATCH_AP_RESPONSIBILITY, -- Responsibility_ID

                                    200 -- Resp_Appl_ID

                                    );                  

                            

                   commit;

                            

       p_req_id := apps.fnd_request.submit_request('IBY',

                                                  'IBYPICPPP',

                                                  '',

                                                  '',

                                                  false,

                                                  'TREASURY WC-24-SEP-2013 13:01:18',

                                                  '',

                                                  'XML_EXTRACT',

                                                  '',

                                                  '',

                                                  '',

                                                  '',

                                                  '',

                                                  '',

                                                  '',

                                                  '',

                                                  '',

                                                  '',

                                                  'No',

                                                  '');

                                                  commit;

                                                 

                                                  dbms_output.put_line(p_req_id);

end;

  • 1. Re: Unable to submit a java concurrent program from PLSQL
    CuauhtemocAmox Journeyer
    Currently Being Moderated

    To troubleshoot the issue, get messages from the stack:

     

    --
    -- Show message on stack if request_id not returned from API
    --
     if ( p_req_id <= 0 ) then
      dbms_output.put_line( fnd_message.get( ));
    end if ;
     
  • 2. Re: Unable to submit a java concurrent program from PLSQL
    886575 Newbie
    Currently Being Moderated

    Try passing variables along with tokens.

     

     

      p_req_id := FND_REQUEST.SUBMIT_REQUEST(application =>'<VALUE>',

                                                                              program =>'<VALUE>',

                                                                              start_time => SYSDATE,

                                                                              sub_request=> TRUE,

                                                                              argument1=> <VALUE>,

                                                                              argument2=> <VALUE>,

                                                                              argument3=> <VALUE>,

                                                                                      .....

                                                                                      .....

                                                                              argumentn=> <VALUE>);

      COMMIT;

      IF (p_req_id = 0) THEN

        fnd_file.put_line(fnd_file.LOG,FND_MESSAGE.GET);

     

     

    Commons errors are either incorrect argument datatypes or the order of the conc prog parameters.

Legend

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