14 Replies Latest reply on Feb 14, 2019 5:25 AM by 3674710

    Concurrent Program not doing anything

    3674710

      Hello,

       

      I am facing problem with concurrent program. I have registered the PLSQL Store Procedure (in that procedure using stock locator API) code to concurrent program that execute the procedure. The scripts in the procedure will create the locator into table. The Procedure works fine while I trying to run directly in PLSQL Developer and create locator in expected table. However, it does not create locator while run the concurrent program. If I compile the script from PLSQL Developer and again run the concurrent request after that locator is created into respected table. But I need to create locator on concurrent request run, don't want to compile it again from PLSQL Developer.

       

      please help me on this..!!

       

      Thank you.

        • 1. Re: Concurrent Program not doing anything
          hal9000akilroy

          some api need application context to work

          dont know if you have it in your plsql developer session

          maybe you dont need all that

          good luck

           

          begin

            mo_global.set_policy_context('S', 82);

            apps.FND_GLOBAL.set_nls_context (p_nls_language => 'CANADIAN FRENCH', p_nls_date_format => null, p_nls_date_language => null, p_nls_numeric_characters => '.,', p_nls_sort => null, p_nls_territory=> null);

            apps.FND_GLOBAL.APPS_INITIALIZE(1192,20707,201);

            commit;

          end;

          • 2. Re: Concurrent Program not doing anything
            John_K

            Context is set for concurrent requests.

             

            I'm a bit confused though that you say it works when you compile the procedure? Are you saying that you have to recompile the package every time you run it from the concurrent request?

             

            Additionally:

            - Does your concurrent program complete successfully without error?

            - Have you checked the return messages (if applicable) from the API?

            • 3. Re: Concurrent Program not doing anything
              hal9000akilroy

              Context is set for concurrent requests.

              but depend of wich user run the job and from wich responsibility

               

               

              • 4. Re: Concurrent Program not doing anything
                3674710

                Yes, if recompile the procedure from oracle sql developer and run the concurrent request then it works. but need to output without recompile.

                Yes,my concurrent program complete successfully without errors.

                Not written any return messages into procedure.

                 

                could you please let me know how to Context is set for concurrent requests.

                 

                Thank you.

                 

                • 5. Re: Concurrent Program not doing anything
                  3674710

                  How to  Context is set for concurrent requests. Could you please suggest.

                   

                  Thank you

                  • 6. Re: Concurrent Program not doing anything
                    3674710

                    I dont know about the below about the context session, I am new in that. Could you please let me how to use and what is this

                     

                    begin

                      mo_global.set_policy_context('S', 82);

                      apps.FND_GLOBAL.set_nls_context (p_nls_language => 'CANADIAN FRENCH', p_nls_date_format => null, p_nls_date_language => null, p_nls_numeric_characters => '.,', p_nls_sort => null, p_nls_territory=> null);

                      apps.FND_GLOBAL.APPS_INITIALIZE(1192,20707,201);

                      commit;

                    end;

                     

                    I already initialize only APPS.fnd_global.apps_initialize(fnd_global.user_id,fnd_global.resp_id,fnd_global.resp_appl_id);    

                    into the procedure.

                    • 7. Re: Concurrent Program not doing anything
                      John_K

                      No need to call apps_initialize. In fact, don't. So does the package go invalid once you've run it the first time?

                      • 8. Re: Concurrent Program not doing anything
                        3674710

                        Okay.. will eliminate the apps_initialize from the code. do you have any guesses about this issue resolution.

                        • 9. Re: Concurrent Program not doing anything
                          aJohny

                          Can you attach your plsql code here ?

                           

                          What I understood is the concurrent program works first time after you compile the code, right ?

                           

                          Do you have debug messages in the code? If not can you add debug messages and see what is happening ?

                           

                          What is happening when you run the concurrent program second time ?

                           

                           

                          Cheers

                          AJ

                          • 10. Re: Concurrent Program not doing anything
                            Kanda-Oracle

                            Hi,

                             

                            Can you refer the seeded one CP PL/SQL REGRESSION TEST ;

                             

                            Thanks!

                            • 11. Re: Concurrent Program not doing anything
                              John_K

                              First thing, get it in line with apps standards..... Package should be compiled in the apps schema, not your custom schema. Remove all schema prefixes and the commit. Replace dbms_output calls with fnd_file calls (writing to the log).

                              • 12. Re: Concurrent Program not doing anything
                                3674710

                                Hello,

                                 

                                Not refer any seeded one CP PL/SQL REGRESSION TEST ;

                                Could you please given me an any example on the same.

                                so, I will try to use in my code.

                                • 13. Re: Concurrent Program not doing anything
                                  John_K

                                  Apologies, I read the following line to mean it was compiled in the custom schema:

                                   

                                  Create or Replace Procedure schemaname.XX_CREATE_LOCATOR -- schema name represent my current schema

                                   

                                  Especially as you have a custom table in "schemaname":

                                   

                                  schemaname.XX_AB_HEADERS

                                   

                                  ??

                                   

                                  Ensure you post the ACTUAL code you are running.

                                   

                                  The reason for the other comments was more to eliminate any other potential side effects. So for the absolute clarification of doubt, the following sequence of steps is how it works?

                                   

                                  1. You create your package in the apps schema and compile it.
                                  2. The concurrent program runs successfully.
                                  3. You run the concurrent program again, and it doesn't run successfully.
                                    1. completes without warning, but does not have the desired outcome.
                                    2. You have no messages output to the concurrent log.
                                  4. You recompile the package in the apps schema.
                                  5. You run the concurrent program again and it works successfully.
                                  • 14. Re: Concurrent Program not doing anything
                                    3674710

                                    Hello,

                                     

                                    Exactly this is happened as you mentioned points above.

                                     

                                    But now the issue has been resolved and my automation

                                     

                                    work as expected. Thanks a lot for your help on this.

                                     

                                    Resolution: Actually, everything is alright with code but the

                                    issue with my current sessions that I logged to oracle EBS

                                    is continuously running  status. So I closed all the running

                                    sessions and applications. After that restarted my machine

                                    and tried to run the concurrent request now this time its worked.