6 Replies Latest reply on May 16, 2018 3:02 PM by Bommi

    Query to check if a Concurrent program has been submitted manually or by scheduler

    _JC_

      Hi Guys,

       

      How can i know, if a concurrent program submitted is submitted manually by a user or is submitted by scheduler.

       

      Thanks and regards,

      Jagdish

        • 1. Re: Query to check if a Concurrent program has been submitted manually or by scheduler
          Simple Patel

          Hello,

           

          You can identified by using PARENT_REQUEST_ID column.

           

          Thanks,

          Vipul

          1 person found this helpful
          • 2. Re: Query to check if a Concurrent program has been submitted manually or by scheduler
            stejac

            check for parent_request_id and resubmit...

             

            SELECT

            A.PROGRAM ,

            A.PROGRAM_SHORT_NAME , A.HOLD_FLAG,

            A.ARGUMENT_TEXT ,

            B.NLS_LANGUAGE ,

            to_char(b.REQUESTED_START_DATE,'hh24:mi') REQUESTED_START_hr,

            rtrim(FCR.RESUBMIT_INTERVAL)||' '||rtrim(FCR.RESUBMIT_INTERVAL_UNIT_CODE) resubmit_code1,

            decode(rtrim(FCR.RESUBMIT_INTERVAL)||' '||rtrim(FCR.RESUBMIT_INTERVAL_UNIT_CODE),'14 DAYS',to_char(a.REQUESTED_START_DATE,'DY'),'7 DAYS',to_char(a.REQUESTED_START_DATE,'DY')) resubmit_code2,

            translate(substr(sch_curr_values,33,7),'01','nY') schedule_value1,

            TRANSLATE(REPLACE(REPLACE(substr(sch_curr_values,1,31),'1:',' '),'14',' '),'01YN47DSP:','nY ') schedule_value2,

            translate(substr(sch_curr_values,32,1),'01','nY') schedule_value3,

            A.REQUESTOR ,

            fres.RESPONSIBILITY_NAME ,

            TO_CHAR(a.REQUESTED_START_DATE,'YYYY/MM/DD HH24:mi:ss') next_REQUESTED_START_DATE

            FROM FND_CONC_REQ_SUMMARY_V  A,

            FND_CONCURRENT_REQUESTS B,

            FND_CONC_REQUESTS_FORM_V FCR,

            FND_RESPONSIBILITY_VL FRES

            WHERE a.REQUEST_ID = fcr.REQUEST_ID

            AND a.REQUEST_ID = b.REQUEST_ID

            and A.PHASE_CODE = 'P'

            AND A.STATUS_CODE IN ('I', 'Q')

            and FCR.RESPONSIBILITY_ID = FRES.RESPONSIBILITY_ID

            order by a.REQUESTED_START_DATE, A.HOLD_FLAG, A.PROGRAM_SHORT_NAME, A.ARGUMENT_TEXT

            1 person found this helpful
            • 3. Re: Query to check if a Concurrent program has been submitted manually or by scheduler
              Bommi

              Hi Jagdish,

               

              Can you try below query (Here, you need to enter the concurrent program name).

               

               

              select  DISTINCT

                      p.user_concurrent_program_name Conc_prog,

                      'SCHEDULED' status

              from     apps.fnd_concurrent_requests r,

                      apps.fnd_conc_release_classes c,

                      apps.fnd_concurrent_programs_tl p,

                      apps.fnd_user s,

                      apps.fnd_responsibility_tl resp

              where     1=1

              and     p.user_concurrent_program_name =:concurrent_program_name

              and     c.application_id = r.release_class_app_id

              and     c.release_class_id = r.release_class_id

              and     nvl(c.date2, sysdate + 1) > sysdate

              and     c.class_type is not null

              and     p.concurrent_program_id = r.concurrent_program_id

              and     p.language = 'US'

              AND     p.language = resp.language

              UNION

              select  DISTINCT

                      fcptl.user_concurrent_program_name Conc_prog

                      ,'MANUAL' status

              from    fnd_concurrent_requests fcr

                      ,fnd_concurrent_programs_tl fcptl

              where   1=1

              and     fcptl.user_concurrent_program_name =:concurrent_program_name

              and     fcr.concurrent_program_id = fcptl.concurrent_program_id

              and     fcr.request_id NOT IN (select  DISTINCT

                                                              r.request_id

                                                      from     apps.fnd_concurrent_requests r,

                                                              apps.fnd_conc_release_classes c,

                                                              apps.fnd_concurrent_programs_tl p,

                                                              apps.fnd_user s,

                                                              apps.fnd_responsibility_tl resp

                                                      where     1=1

                                                      and     p.user_concurrent_program_name =:concurrent_program_name

                                                      and     c.application_id = r.release_class_app_id

                                                      and     c.release_class_id = r.release_class_id

                                                      and     nvl(c.date2, sysdate + 1) > sysdate

                                                      and     c.class_type is not null

                                                      and     p.concurrent_program_id = r.concurrent_program_id

                                                      and     p.language = 'US'

                                                      AND     p.language = resp.language)

              ;

               

               

              Regards,

              Bommi

              1 person found this helpful
              • 4. Re: Query to check if a Concurrent program has been submitted manually or by scheduler
                _JC_

                Although, we never came across this situation, but the approach we were thinking is that when a program is submitted by scheduler it will have Parent Request Id, whereas when user submit it, it won't have this column populated in fnd_concurrent_request table.

                1 person found this helpful
                • 5. Re: Query to check if a Concurrent program has been submitted manually or by scheduler
                  Bommi

                  Hi JC,

                       Exactly, that is why I shared 2 queries where the first will fetch the schedules program details and other will fetch the manually ran programs

                   

                  Regards,

                  Bommi

                  • 6. Re: Query to check if a Concurrent program has been submitted manually or by scheduler
                    Bommi

                    Hi JC,

                         If the response helped your requirement, please mark it accordingly and lets close

                     

                    Regards,

                    Bommi