DBA Data[Home] [Help]

APPS.INV_ENHANCED_TM_PERF SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 32

       select rowid from mtl_transactions_interface mti
       where PROCESS_FLAG = 1
       AND NVL(LOCK_FLAG,2) = 2
       AND TRANSACTION_MODE = 3
       AND EXISTS (
                 SELECT 'X'
                 FROM MTL_TRANSACTION_TYPES MTT
                 WHERE MTT.TRANSACTION_TYPE_ID = MTI.TRANSACTION_TYPE_ID
                 AND MTT.TRANSACTION_SOURCE_TYPE_ID IN (2,8,16))
       and exists (
                 select 1
                 from   org_organization_definitions ood
                 where  ood.organization_id = mti.organization_id
                 and    nvl(ood.disable_date, sysdate + 1) > sysdate)
       order by mti.inventory_item_id;
Line: 49

       select rowid from mtl_transactions_interface mti
       where PROCESS_FLAG = 1
       AND NVL(LOCK_FLAG,2) = 2
       AND TRANSACTION_MODE = 3
       AND EXISTS (
                 SELECT 'X'
                 FROM MTL_TRANSACTION_TYPES MTT
                 WHERE MTT.TRANSACTION_TYPE_ID = MTI.TRANSACTION_TYPE_ID
                 AND MTT.TRANSACTION_SOURCE_TYPE_ID NOT IN (2,5,8,16))
       and exists (
                 select 1
                 from   org_organization_definitions ood
                 where  ood.organization_id = mti.organization_id
                 and    nvl(ood.disable_date, sysdate + 1) > sysdate)
       order by mti.inventory_item_id;
Line: 99

          select inventory_item_id, count(1) record_count
          bulk collect into l_mti_rec
          from mtl_transactions_interface mti
          where PROCESS_FLAG = 1
          AND NVL(LOCK_FLAG,2) = 2
          AND TRANSACTION_MODE = 3
          AND EXISTS (
                    SELECT 'X'
                    FROM MTL_TRANSACTION_TYPES MTT
                    WHERE MTT.TRANSACTION_TYPE_ID = MTI.TRANSACTION_TYPE_ID
                    AND MTT.TRANSACTION_SOURCE_TYPE_ID IN (2,8,16))
          and exists (
                    select 1
                    from   org_organization_definitions ood
                    where  ood.organization_id = mti.organization_id
                    and    nvl(ood.disable_date, sysdate + 1) > sysdate)
          group by inventory_item_id
          having count(*) >= p_maxrows
          order by record_count desc;
Line: 128

             update mtl_transactions_interface mti
                set transaction_header_id = l_header_id,
                           last_update_date = sysdate,
                           last_updated_by = p_userid,
                           LAST_UPDATE_LOGIN = p_loginid,
                           PROGRAM_APPLICATION_ID = p_applid,
                           program_id = p_progid,
                           REQUEST_ID = p_reqstid,
                           PROGRAM_UPDATE_DATE = SYSDATE,
                           LOCK_FLAG = 1,
                           error_code = null,
                           error_explanation = null
              where inventory_item_id = l_mti_rec(i).item_id
                and process_flag = 1
                and nvl(lock_flag,2) = 2
                and transaction_mode = 3
                and exists (
                      select 'X'
                      FROM MTL_TRANSACTION_TYPES MTT
                      where mtt.transaction_type_id = mti.transaction_type_id
                      and mtt.transaction_source_type_id in (2,8,16))
                and exists (
                      select 1
                      from   org_organization_definitions ood
                      where  ood.organization_id = mti.organization_id
                      and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 159

              update mtl_transactions_interface mti
                       set transaction_header_id = l_header_id,
                           last_update_date = sysdate,
                     last_updated_by = p_userid,
                     LAST_UPDATE_LOGIN = p_loginid,
                     PROGRAM_APPLICATION_ID = p_applid,
                     program_id = p_progid,
                     request_id = p_reqstid,
                           program_update_date = sysdate,
                           lock_flag = 1,
                           error_code = null,
                           error_explanation = null
               where process_flag = 1
                       and nvl(lock_flag,2) = 2
                       and transaction_mode = 3
                       and exists (
                                  select 'X'
                                  from mtl_transaction_types mtt
                      where mtt.transaction_type_id = mti.transaction_type_id
                                  and mtt.transaction_source_type_id in (2,8,16))
                       and transaction_batch_id is not null
                       and transaction_batch_id in (
                      select mti2.transaction_batch_id
                      from mtl_transactions_interface mti2
                                              where mti2.transaction_header_id = l_header_id
                                              and mti2.transaction_batch_id is not null
                                              and mti2.lock_flag = 1
                                              and mti2.error_code is null
                                              and mti2.error_explanation is null)
                       and exists (                                           /* Bug 6223219 */
                                        select 1
                                        from   org_organization_definitions ood
                                  where  ood.organization_id = mti.organization_id
                                        and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 221

             l_rowid.DELETE;
Line: 244

                   update mtl_transactions_interface
                      SET transaction_header_id = l_header_id,
                           last_update_date = sysdate,
                           last_updated_by = p_userid,
                           LAST_UPDATE_LOGIN = p_loginid,
                           PROGRAM_APPLICATION_ID = p_applid,
                           program_id = p_progid,
                           REQUEST_ID = p_reqstid,
                           PROGRAM_UPDATE_DATE = SYSDATE,
                           LOCK_FLAG = 1,
                           error_code = null,
                           error_explanation = null
                    where  rowid = l_rowid(j);
Line: 269

             update mtl_transactions_interface mti
               SET TRANSACTION_HEADER_ID = l_header_id,
                   last_update_date = sysdate,
                   last_updated_by = p_userid,
                   LAST_UPDATE_LOGIN = p_loginid,
                   PROGRAM_APPLICATION_ID = p_applid,
                   program_id = p_progid,
                   REQUEST_ID = p_reqstid,
                   PROGRAM_UPDATE_DATE = SYSDATE,
                   LOCK_FLAG = 1,
                   ERROR_CODE = NULL,
                   error_explanation = null
             WHERE PROCESS_FLAG = 1
               and nvl(lock_flag,2) = 2
               and transaction_mode = 3
               and exists (
                  select 'X'
                  from mtl_transaction_types mtt
                  where mtt.transaction_type_id = mti.transaction_type_id
                  and mtt.transaction_source_type_id in (2,8,16))
               and inventory_item_id in (
                         select mti2.inventory_item_id
                         from mtl_transactions_interface mti2
                         where mti2.transaction_header_id = l_header_id
                         and mti2.LOCK_FLAG = 1
                         and mti2.error_code is null
                         and mti2.ERROR_EXPLANATION is NULL)
               and exists (                                            /* Bug 5951465 */
                   SELECT 1
                   from   org_organization_definitions ood
                   where  ood.organization_id = mti.organization_id
                   and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 308

             update mtl_transactions_interface mti
                       set transaction_header_id = l_header_id,
                           last_update_date = sysdate,
                           last_updated_by = p_userid,
                     last_update_login = p_loginid,
                     program_application_id = p_applid,
                     program_id = p_progid,
                     REQUEST_ID = p_reqstid,
                           program_update_date = sysdate,
                           lock_flag = 1,
                           error_code = null,
                           error_explanation = null
               where process_flag = 1
                       and nvl(lock_flag,2) = 2
                       and transaction_mode = 3
                       and exists (
                                  select 'X'
                                  from mtl_transaction_types mtt
                      where mtt.transaction_type_id = mti.transaction_type_id
                                  and mtt.transaction_source_type_id in (2,8,16))
                       and transaction_batch_id is not null
                       and transaction_batch_id in (
                      select mti2.transaction_batch_id
                      from mtl_transactions_interface mti2
                                              where mti2.transaction_header_id = l_header_id
                                              and mti2.transaction_batch_id is not null
                                              and mti2.lock_flag = 1
                                              and mti2.error_code is null
                                              and mti2.error_explanation is null)
                       and exists (                                           /* Bug 6223219 */
                                        select 1
                                        from   org_organization_definitions ood
                                  where  ood.organization_id = mti.organization_id
                                        and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 374

          select inventory_item_id, count(1) record_count
          bulk collect into l_mti_rec
          from mtl_transactions_interface mti
          where PROCESS_FLAG = 1
          AND NVL(LOCK_FLAG,2) = 2
          AND TRANSACTION_MODE = 3
          AND EXISTS (
                    SELECT 'X'
                    FROM MTL_TRANSACTION_TYPES MTT
                    WHERE MTT.TRANSACTION_TYPE_ID = MTI.TRANSACTION_TYPE_ID
                    AND MTT.TRANSACTION_SOURCE_TYPE_ID NOT IN (2,5,8,16))
          and exists (
                    select 1
                    from   org_organization_definitions ood
                    where  ood.organization_id = mti.organization_id
                    and    nvl(ood.disable_date, sysdate + 1) > sysdate)
          group by inventory_item_id
          having count(*) >= p_maxrows
          order by record_count desc;
Line: 403

             update mtl_transactions_interface mti
                set transaction_header_id = l_header_id,
                           last_update_date = sysdate,
                           last_updated_by = p_userid,
                           LAST_UPDATE_LOGIN = p_loginid,
                           PROGRAM_APPLICATION_ID = p_applid,
                           program_id = p_progid,
                           REQUEST_ID = p_reqstid,
                           PROGRAM_UPDATE_DATE = SYSDATE,
                           LOCK_FLAG = 1,
                           error_code = null,
                           error_explanation = null
              where inventory_item_id = l_mti_rec(i).item_id
                and process_flag = 1
                and nvl(lock_flag,2) = 2
                and transaction_mode = 3
                and exists (
                      select 'X'
                      FROM MTL_TRANSACTION_TYPES MTT
                      where mtt.transaction_type_id = mti.transaction_type_id
                      and mtt.transaction_source_type_id not in (2,5,8,16))
                and exists (
                      select 1
                      from   org_organization_definitions ood
                      where  ood.organization_id = mti.organization_id
                      and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 434

              update mtl_transactions_interface mti
                       set transaction_header_id = l_header_id,
                           last_update_date = sysdate,
                     last_updated_by = p_userid,
                     LAST_UPDATE_LOGIN = p_loginid,
                     PROGRAM_APPLICATION_ID = p_applid,
                     program_id = p_progid,
                     request_id = p_reqstid,
                           program_update_date = sysdate,
                           lock_flag = 1,
                           error_code = null,
                           error_explanation = null
               where process_flag = 1
                       and nvl(lock_flag,2) = 2
                       and transaction_mode = 3
                       and exists (
                                  select 'X'
                                  from mtl_transaction_types mtt
                      where mtt.transaction_type_id = mti.transaction_type_id
                                  and mtt.transaction_source_type_id not in (2,5,8,16))
                       and transaction_batch_id is not null
                       and transaction_batch_id in (
                      select mti2.transaction_batch_id
                      from mtl_transactions_interface mti2
                                              where mti2.transaction_header_id = l_header_id
                                              and mti2.transaction_batch_id is not null
                                              and mti2.lock_flag = 1
                                              and mti2.error_code is null
                                              and mti2.error_explanation is null)
                       and exists (                                           /* Bug 6223219 */
                                        select 1
                                        from   org_organization_definitions ood
                                  where  ood.organization_id = mti.organization_id
                                        and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 496

             l_rowid.DELETE;
Line: 519

                   update mtl_transactions_interface
                      SET transaction_header_id = l_header_id,
                           last_update_date = sysdate,
                           last_updated_by = p_userid,
                           LAST_UPDATE_LOGIN = p_loginid,
                           PROGRAM_APPLICATION_ID = p_applid,
                           program_id = p_progid,
                           REQUEST_ID = p_reqstid,
                           PROGRAM_UPDATE_DATE = SYSDATE,
                           LOCK_FLAG = 1,
                           error_code = null,
                           error_explanation = null
                    where  rowid = l_rowid(j);
Line: 544

             update mtl_transactions_interface mti
               SET TRANSACTION_HEADER_ID = l_header_id,
                   last_update_date = sysdate,
                   last_updated_by = p_userid,
                   LAST_UPDATE_LOGIN = p_loginid,
                   PROGRAM_APPLICATION_ID = p_applid,
                   program_id = p_progid,
                   REQUEST_ID = p_reqstid,
                   PROGRAM_UPDATE_DATE = SYSDATE,
                   LOCK_FLAG = 1,
                   ERROR_CODE = NULL,
                   error_explanation = null
             WHERE PROCESS_FLAG = 1
               and nvl(lock_flag,2) = 2
               and transaction_mode = 3
               and exists (
                  select 'X'
                  from mtl_transaction_types mtt
                  where mtt.transaction_type_id = mti.transaction_type_id
                  and mtt.transaction_source_type_id not in (2,5,8,16))
               and inventory_item_id in (
                         select mti2.inventory_item_id
                         from mtl_transactions_interface mti2
                         where mti2.transaction_header_id = l_header_id
                         and mti2.LOCK_FLAG = 1
                         and mti2.error_code is null
                         and mti2.ERROR_EXPLANATION is NULL)
               and exists (                                            /* Bug 5951465 */
                   SELECT 1
                   from   org_organization_definitions ood
                   where  ood.organization_id = mti.organization_id
                   and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 583

             update mtl_transactions_interface mti
                set transaction_header_id = l_header_id,
                    last_update_date = sysdate,
                    last_updated_by = p_userid,
                    last_update_login = p_loginid,
                    program_application_id = p_applid,
                    program_id = p_progid,
                    REQUEST_ID = p_reqstid,
                    program_update_date = sysdate,
                    lock_flag = 1,
                    error_code = null,
                    error_explanation = null
               where process_flag = 1
                       and nvl(lock_flag,2) = 2
                       and transaction_mode = 3
                       and exists (
                                  select 'X'
                                  from mtl_transaction_types mtt
                      where mtt.transaction_type_id = mti.transaction_type_id
                                  and mtt.transaction_source_type_id not in (2,5,8,16))
                       and transaction_batch_id is not null
                       and transaction_batch_id in (
                      select mti2.transaction_batch_id
                      from mtl_transactions_interface mti2
                                              where mti2.transaction_header_id = l_header_id
                                              and mti2.transaction_batch_id is not null
                                              and mti2.lock_flag = 1
                                              and mti2.error_code is null
                                              and mti2.error_explanation is null)
                       and exists (                                           /* Bug 6223219 */
                                        select 1
                                        from   org_organization_definitions ood
                                  where  ood.organization_id = mti.organization_id
                                        and    nvl(ood.disable_date, sysdate + 1) > sysdate);
Line: 680

    select mtl_material_transactions_s.nextval
      into l_value
    from dual;