14 Replies Latest reply on May 3, 2017 4:48 AM by G Vijay

    Request set submitted but Phase shows Inactive and status as No Manager in Requests window

    G Vijay

      Hi All,

       

      Using the script from the metalink note Concurrent Processing - Sample Code for FND_SUBMIT and FND_REQUEST API's (Doc ID 221542.1) i tried to execute the script, but after submission of the request set, it is showing Inactive/No Manager. But the same request when i submit using SRS then it submits successfully. Can anyone please help me in understanding what is happening when the request set is submitted using API....

       

      Thanks in advance..

       

       

        • 1. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
          John_K

          Please post the exact code you are using to submit the request.

          • 2. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
            G Vijay

            Here is the Sample Code that i'm using.

            CREATE OR REPLACE PROCEDURE fnd_submit_test(errbuf                                       OUT VARCHAR2
                                                      , retcode                                      OUT VARCHAR2)
            AS
               success                                      BOOLEAN;
               req_id                                       NUMBER;
               req_data                                     VARCHAR2(10);
               srs_failed                                   EXCEPTION;
               submitprog_failed                            EXCEPTION;
               submitset_failed                             EXCEPTION;
            BEGIN
               -- Use FND_FILE to output messages at each stage
               fnd_file.put_line(fnd_file.LOG
                               , 'Starting test...');
            
            
               -- Read fnd_conc_global.request_data, if available then we have been
               -- reawakened after the request set has completed.
               -- If so, exit.
               req_data                                                 := fnd_conc_global.request_data;
            
            
               IF (req_data IS NOT NULL)
               THEN
                  errbuf                                                   := 'Done!';
                  retcode                                                  := 0;
                  RETURN;
               END IF;
            
            
            
            
               -- Step 1 - call set_request_set
               fnd_file.put_line(fnd_file.LOG
                               , 'Calling set_request_set...');
            
            
               success                                                  :=
                  fnd_submit.set_request_set('FND'
                                           , 'FNDRSSUB43');
            
            
               IF (NOT success)
               THEN
                  RAISE srs_failed;
               END IF;
            
            
            
            
               fnd_file.put_line(fnd_file.LOG
                               , 'Calling submit program first time...');
            
            
               -- Step 2 - call submit program for each program in the set
               success                                                  :=
                  fnd_submit.submit_program('FND'
                                          , 'FNDMNFUN'
                                          , 'STAGE10'
                                          , 'System Administrator'
                                          , CHR( 0));
            
            
               IF (NOT success)
               THEN
                  RAISE submitprog_failed;
               END IF;
            
            
            
            
               fnd_file.put_line(fnd_file.LOG
                               , 'Calling submit program second time...');
            
            
               success                                                  :=
                  fnd_submit.submit_program('FND'
                                          , 'FNDMNMNU'
                                          , 'STAGE10'
                                          , 'System Administrator'
                                          , CHR( 0));
            
            
               IF (NOT success)
               THEN
                  RAISE submitprog_failed;
               END IF;
            
            
            
            
               fnd_file.put_line(fnd_file.LOG
                               , 'Calling submit program third time...');
            
            
               success                                                  :=
                  fnd_submit.submit_program('FND'
                                          , 'FNDMNNAV'
                                          , 'STAGE10'
                                          , 'System Administrator'
                                          , CHR( 0));
            
            
               IF (NOT success)
               THEN
                  RAISE submitprog_failed;
               END IF;
            
            
            
            
               -- Step 3 - call submit_set
               fnd_file.put_line(fnd_file.LOG
                               , 'Calling submit_set...');
            
            
               req_id                                                   :=
                  fnd_submit.submit_set(NULL
                                      , TRUE);
            
            
               IF (req_id = 0)
               THEN
                  RAISE submitset_failed;
               END IF;
            
            
               fnd_file.put_line(fnd_file.LOG
                               , 'Finished.');
            
            
            
            
               -- Set conc_status to PAUSED, set request_data to 1 and exit
               fnd_conc_global.set_req_globals(conc_status                               => 'PAUSED'
                                             , request_data                              => '1');
            
            
               errbuf                                                   :=
                     'Request set submitted. id = '
                  || req_id;
               retcode                                                  := 0;
            EXCEPTION
               WHEN srs_failed
               THEN
                  errbuf                                                   :=
                        'Call to set_request_set failed: '
                     || fnd_message.get;
                  retcode                                                  := 2;
                  fnd_file.put_line(fnd_file.LOG
                                  , errbuf);
               WHEN submitprog_failed
               THEN
                  errbuf                                                   :=
                        'Call to submit_program failed: '
                     || fnd_message.get;
                  retcode                                                  := 2;
                  fnd_file.put_line(fnd_file.LOG
                                  , errbuf);
               WHEN submitset_failed
               THEN
                  errbuf                                                   :=
                        'Call to submit_set failed: '
                     || fnd_message.get;
                  retcode                                                  := 2;
                  fnd_file.put_line(fnd_file.LOG
                                  , errbuf);
               WHEN OTHERS
               THEN
                  errbuf                                                   :=
                        'Request set submission failed - unknown error: '
                     || SQLERRM;
                  retcode                                                  := 2;
                  fnd_file.put_line(fnd_file.LOG
                                  , errbuf);
            END;
            /
            
            
            REM ===================================================================
            COMMIT;
            EXIT;
            
            • 3. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
              mdtaylor

              Looks like you are immediately setting the request to paused.  Maybe comment out the following line:

               

              fnd_conc_global.set_req_globals(conc_status                           => 'PAUSED' 
                                           , request_data                          => '1'); 
              • 4. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                G Vijay

                Hi,

                 

                Tried commenting the said code but still it is showing the same phase/Status.

                 

                FYI.. We are on 12.1.3

                 

                Thanks,

                -Vijay

                • 5. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                  G Vijay

                  Can any one help me in this regard.

                   

                  Thanks a lot in advance.

                  • 6. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                    mdtaylor

                    The code from the Note did not work, but this does for me on 12.1.3:

                     

                    create or replace procedure fnd_submit_test (errbuf out varchar2,

                    retcode out varchar2) as

                     

                    success boolean;

                    req_id number;

                    req_data varchar2(10);

                    srs_failed exception;

                    submitprog_failed exception;

                    submitset_failed exception;

                     

                    begin

                     

                    -- Use FND_FILE to output messages at each stage

                    fnd_file.put_line(fnd_file.log, 'Starting test...');

                     

                    -- Read fnd_conc_global.request_data, if available then we have been

                    -- reawakened after the request set has completed.

                    -- If so, exit.

                    req_data := fnd_conc_global.request_data;

                     

                    if (req_data is not null) then

                     

                    errbuf := 'Done!';

                    retcode := 0 ;

                    return;

                    end if;

                     

                     

                    -- Step 1 - call set_request_set

                    fnd_file.put_line(fnd_file.log, 'Calling set_request_set...');

                     

                    success := fnd_submit.set_request_set('FND', 'FNDRSSUB43');

                    if ( not success ) then

                    raise srs_failed;

                    end if;

                     

                     

                    fnd_file.put_line(fnd_file.log, 'Calling submit program first time...');

                     

                    -- Step 2 - call submit program for each program in the set

                    success := fnd_submit.submit_program('FND','FNDMNFUN', 'STAGE10', 'SYSADMIN', 'SYSTEM_ADMINISTRATOR');

                    if ( not success ) then

                    raise submitprog_failed;

                    end if;

                     

                     

                    fnd_file.put_line(fnd_file.log, 'Calling submit program second time...');

                     

                    success := fnd_submit.submit_program('FND','FNDMNMNU', 'STAGE10', 'SYSADMIN', 'SYSTEM_ADMINISTRATOR');

                    if ( not success ) then

                    raise submitprog_failed;

                    end if;

                     

                     

                    fnd_file.put_line(fnd_file.log, 'Calling submit program third time...');

                     

                    success := fnd_submit.submit_program('FND','FNDMNNAV', 'STAGE10', 'SYSADMIN', 'SYSTEM_ADMINISTRATOR');

                    if ( not success ) then

                    raise submitprog_failed;

                    end if;

                     

                     

                    -- Step 3 - call submit_set

                    fnd_file.put_line(fnd_file.log, 'Calling submit_set...');

                     

                    req_id := fnd_submit.submit_set(null,true);

                     

                    if (req_id = 0 ) then

                    raise submitset_failed;

                    end if;

                     

                    fnd_file.put_line(fnd_file.log, 'Finished.');

                     

                     

                    -- Set conc_status to PAUSED, set request_data to 1 and exit

                    fnd_conc_global.set_req_globals(conc_status => 'PAUSED', request_data => '1') ;

                     

                    errbuf := 'Request set submitted. id = ' || req_id;

                    retcode := 0;

                     

                     

                    exception

                    when srs_failed then

                    errbuf := 'Call to set_request_set failed: ' || fnd_message.get;

                    retcode := 2;

                    fnd_file.put_line(fnd_file.log, errbuf);

                    when submitprog_failed then

                    errbuf := 'Call to submit_program failed: ' || fnd_message.get;

                    retcode := 2;

                    fnd_file.put_line(fnd_file.log, errbuf);

                    when submitset_failed then

                    errbuf := 'Call to submit_set failed: ' || fnd_message.get;

                    retcode := 2;

                    fnd_file.put_line(fnd_file.log, errbuf);

                    when others then

                    errbuf := 'Request set submission failed - unknown error: ' || sqlerrm;

                    retcode := 2;

                    fnd_file.put_line(fnd_file.log, errbuf);

                    end;

                     

                    fnd_submit_test.png

                     

                    Regards,

                    Michael

                    • 8. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                      mdtaylor

                      Here are the executable and CP definition screenshots.

                       

                      fnd_submit_test1.png

                       

                      Also ensure the Standard Manager is running and there are no Exclusion Rules for any Function Security Requests.

                       

                      fnd_submit_test2.png

                      • 9. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                        G Vijay

                        Do i need to call the above code through Concurrent program only. Cant i submit it from the back end.

                         

                        Thanks,

                        -Vijay

                        • 10. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                          mdtaylor

                          I could not successfully submit from the back end.  When I try, I get the following error:

                           

                          set serveroutput on

                           

                          declare

                                  errbuf           varchar2(2000);

                                  retcode          number;

                                  l_request_id     NUMBER;

                          begin

                          fnd_global.apps_initialize(0, 20420, 1);

                           

                          fnd_submit_test(errbuf,retcode);

                          dbms_output.put_line('errbuf: '||errbuf);

                          dbms_output.put_line('retcode: '||retcode);

                           

                                IF l_request_id != 0 THEN

                                      DBMS_OUTPUT.PUT_LINE('THE REQUEST ID '||TO_CHAR(l_request_id));

                                      COMMIT;

                               ELSE

                                     DBMS_OUTPUT.PUT_LINE('ERROR WHILE SUBMITTING REQUEST SET:');

                                     l_request_id := 0;

                               END IF;

                          end;

                          /

                           

                          anonymous block completed

                          errbuf: Call to set_request_set failed: Cannot submit request for request set FNDRSSUB43.

                           

                          Cause: FNDRSSUB43 is not a valid request set name or this is not active any more.

                           

                          Action: Provide a valid name or activate the set.

                          retcode: 2

                          ERROR WHILE SUBMITTING REQUEST SET:

                           

                          How are you submitting it to get further?

                          • 11. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                            G Vijay

                            I register it as a procedure and used below code to execute it.

                             

                            DECLARE

                               errbuf                                       VARCHAR2(500);

                               retcode                                      VARCHAR2(500);

                            BEGIN

                               fnd_global.apps_initialize(12247

                                                        , 51822

                                                        , 20003);

                               apps.fnd_submit_test1(errbuf

                                                        , retcode);

                               COMMIT;

                            END;

                            • 12. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                              mdtaylor

                              I still get "FNDRSSUB43 is not a valid request set name or this is not active any more" using your backend procedure but it launches fine as a concurrent request.

                              • 13. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                                G Vijay

                                Not sure. For me it works and submits the request set but it is not able to find the manager to process the program, Seems like something wrong with the Script.

                                • 14. Re: Request set submitted but Phase shows Inactive and status as No Manager in Requests window
                                  G Vijay

                                  After defining the Concurrent program for the script then it works for me as well and it is submitting the request set successfully.

                                   

                                  But still would like to know whats wrong when executing the procedure from the back end.