DBA Data[Home] [Help]

APPS.HXC_GENERIC_RETRIEVAL_PKG SQL Statements

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

Line: 43

   t_timecard_deleted              DBMS_SQL.varchar2_table;
Line: 94

   t_detail_deleted                DBMS_SQL.varchar2_table;
Line: 122

      SELECT hxc_transactions_s.NEXTVAL
        FROM SYS.DUAL;
Line: 135

      SELECT /*+ INDEX_FFS(TXD HXC_TRANSACTION_DETAILS_PK) *
             hxc_transaction_details_s.NEXTVAL
        FROM hxc_transaction_details txd
       WHERE ROWNUM <= p_max;
Line: 143

      SELECT hxc_transaction_details_s.NEXTVAL
        FROM SYS.DUAL
     CONNECT BY LEVEL <= p_max ;
Line: 149

   PROCEDURE insert_query (p_query LONG
/*PROFILER(457): LONG (advise: migrate to LOB) is Oracle 7.0 (deprecated in 8.1.5) */
                                       , p_type VARCHAR2)
   IS
      PRAGMA AUTONOMOUS_TRANSACTION;
Line: 155

      DELETE FROM hxc_debug_text
            WHERE process = 'RETRIEVAL' AND TYPE = p_type;
Line: 158

      INSERT INTO hxc_debug_text
                  (process, TYPE, text
                  )
           VALUES ('RETRIEVAL', p_type, p_query
                  );
Line: 165

   END insert_query;
Line: 251

 EXISTS ( select 1 from hxc_time_attribute_usages usage,
                        hxc_time_attributes att
          where usage.time_building_Block_id  = detail_block.time_building_block_id AND
                usage.time_building_block_ovn = detail_block.object_version_number
          and
                att.time_attribute_id = usage.time_attribute_id and
                att.';
Line: 260

 EXISTS ( select 1 from hxc_time_attribute_usages usage,
                        hxc_time_attributes att
          where usage.time_building_Block_id  = timecard_block.time_building_block_id AND
                usage.time_building_block_ovn = timecard_block.object_version_number
          and
                att.time_attribute_id = usage.time_attribute_id and
                att.';
Line: 529

         SELECT        rr.retrieval_range_id, rr.range_start, rr.range_stop
                  FROM hxc_retrieval_ranges rr
                 WHERE rr.retrieval_process_id = p_process_id
                   AND rr.transaction_id = 0
                   AND (   rr.where_clause = g_params.p_where_clause
                        OR rr.where_clause IS NULL
                       )
              ORDER BY rr.seq
         FOR UPDATE OF transaction_id NOWAIT;
Line: 609

            SELECT TYPE
              FROM hxc_debug_text
             WHERE process = p_range;
Line: 616

             IS   SELECT has.application_set_id
                    FROM hxc_retrieval_processes hrp,
                  	     hxc_application_set_comps_v has
                   WHERE hrp.name = DECODE(p_process,
                                           'Apply Schedule Rules','BEE Retrieval Process',
                                           p_process)
                     AND hrp.time_recipient_id = has.time_recipient_id;
Line: 636

SELECT DISTINCT tbb.resource_id
FROM   hxc_latest_details tbb
WHERE  tbb.last_update_date > :p_since_date ';
Line: 645

SELECT DISTINCT tbb.resource_id
FROM   hxc_pa_latest_details tbb
WHERE  tbb.last_update_date > :p_since_date ';
Line: 651

SELECT DISTINCT tbb.resource_id
FROM   hxc_pay_latest_details tbb
WHERE  tbb.last_update_date > :p_since_date ';
Line: 658

SELECT DISTINCT tbb.resource_id
FROM   hxc_latest_details tbb
WHERE  tbb.last_update_date > :p_since_date ';
Line: 666

SELECT DISTINCT tbb.resource_id
FROM   hxc_pa_latest_details tbb
WHERE  tbb.last_update_date > :p_since_date ';
Line: 672

SELECT DISTINCT tbb.resource_id
FROM   hxc_pay_latest_details tbb
WHERE  tbb.last_update_date > :p_since_date ';
Line: 691

' INSERT INTO hxc_rdb_process_timecards
              (timecard_id,
               resource_id,
               start_time,
               stop_time,
               stage,
               request_id,
               ret_user_id,
               process)
SELECT /*+ INDEX(tbb LATEST_DETAILS_N2)
           INDEX(sum HXC_TIME_BUILDING_BLOCKS_PK) */
       DISTINCT tbb.timecard_id,
               sum.resource_id,
               sum.start_time,
               TRUNC(sum.stop_time),
               ''PENDING'',
               fnd_global.conc_request_id,
               fnd_global.user_id,
               RETRIEVALPROCESS
  FROM LATEST_DETAILS tbb,
       hxc_time_building_blocks sum
 WHERE sum.resource_id = tbb.resource_id
   AND sum.time_building_block_id = tbb.timecard_id
   AND tbb.last_update_date > :p_since_date';
Line: 735

               IS SELECT requested_start_date
                    FROM fnd_concurrent_requests
                   WHERE request_id = FND_GLOBAL.conc_request_id;
Line: 810

                    INSERT INTO HXC_RDB_PENDING_PROCESSES
                           ( request_id,
                             concurrent_program_id,
                             user_id,
                             status)
                    VALUES ( FND_GLOBAL.conc_request_id,
                             FND_GLOBAL.conc_program_id,
                             FND_GLOBAL.user_id,
                             'PENDING_SNAPSHOT');
Line: 838

                    INSERT INTO hxc_retrieval_requests_all
                           ( request_id,
                             conc_program_id,
                             user_id,
                             request_date,
                             ret_trans_code)
                    VALUES ( FND_GLOBAL.conc_request_id,
                             FND_GLOBAL.conc_program_id,
                             FND_GLOBAL.user_id,
                             l_request_date,
                             g_params.p_transaction_code);
Line: 1176

         insert_query (l_dynamic_sql, 'RANGE');
Line: 1204

      PROCEDURE insert_rr_resources (
         p_resource_list   IN              DBMS_SQL.number_table,
         p_rr_id           IN OUT NOCOPY   NUMBER
      )
      IS
         CURSOR csr_get_rr_id
         IS
            SELECT hxc_retrieval_ranges_s.NEXTVAL
              FROM DUAL;
Line: 1219

            l_proc := g_package || '.insert_rr_resources';
Line: 1232

            INSERT INTO hxc_retrieval_range_resources
                        (retrieval_range_id, resource_id
                        )
                 VALUES (l_rr_id, p_resource_list (rrx)
                        );
Line: 1249

      END insert_rr_resources;
Line: 1256

            SELECT 'x'
              FROM hxc_retrieval_ranges rr
             WHERE rr.retrieval_process_id = p_process_id
               AND (   rr.where_clause IS NULL
                    OR rr.where_clause = g_params.p_where_clause
                   )
               AND rr.transaction_id = 0;
Line: 1266

            SELECT 'x'
              FROM hxc_transactions tx
             WHERE tx.status = 'IN PROGRESS'
               AND tx.TYPE = 'RETRIEVAL'
               AND tx.transaction_process_id = p_process_id
               AND EXISTS (SELECT 'y'
                             FROM hxc_retrieval_ranges rr
                            WHERE rr.transaction_id = tx.transaction_id
                             AND (   rr.where_clause IS NULL
                                      OR rr.where_clause = g_params.p_where_clause)
                            );
Line: 1385

                     hr_utility.TRACE ('Inserting rows');
Line: 1447

                        insert_rr_resources (p_resource_list      => t_resource_id,
                                             p_rr_id              => l_rr_id
                                            );
Line: 1478

                        t_resource_id.DELETE;
Line: 1490

                     INSERT INTO hxc_retrieval_ranges
                                 (retrieval_range_id,
                                  retrieval_process_id,
                                  range_start, range_stop,
                                  seq, transaction_id, where_clause,
                                  unique_params, conc_request_id
                                 )
                          VALUES (t_rr_id (rrx),
                                  t_retrieval_process_id (rrx),
                                  t_range_start (rrx), t_range_stop (rrx),
                                  t_seq (rrx), 0, t_where_clause (rrx),
                                  g_params.p_unique_params, g_conc_request_id
                                 );
Line: 1506

                     hr_utility.TRACE ('After bulk insert');
Line: 1539

               UPDATE hxc_retrieval_ranges rr
                  SET rr.transaction_id =
                                    hxc_generic_retrieval_pkg.g_transaction_id,
                      rr.conc_request_id = g_conc_request_id
                WHERE rr.retrieval_range_id = r_range.retrieval_range_id;
Line: 1729

         SELECT TO_CHAR (time_building_block_id) tbb_id,
                TO_CHAR (object_version_number) tbb_ovn
           FROM hxc_retrieval_range_blks;
Line: 1734

      l_select_from           VARCHAR2 (250)
         := '
SELECT /*+ ordered */
       tbb_latest.time_building_block_id,
       tbb_latest.object_version_number insert_latest
FROM    hxc_retrieval_ranges rr
,       hxc_retrieval_range_resources rrr
,       hxc_latest_details tbb_latest ';
Line: 1746

      l_select_from_pa           VARCHAR2 (250)
         := '
SELECT /*+ ordered */
       tbb_latest.time_building_block_id,
       tbb_latest.object_version_number insert_latest
FROM    hxc_retrieval_ranges rr
,       hxc_retrieval_range_resources rrr
,       hxc_pa_latest_details tbb_latest ';
Line: 1755

      l_select_from_pay           VARCHAR2 (250)
         := '
SELECT /*+ ordered */
       tbb_latest.time_building_block_id,
       tbb_latest.object_version_number insert_latest
FROM    hxc_retrieval_ranges rr
,       hxc_retrieval_range_resources rrr
,       hxc_pay_latest_details tbb_latest ';
Line: 1774

        tbb_latest.last_update_date >= :p_since_date ';
Line: 1795

AND NOT EXISTS (select /*+ INDEX(tx HXC_TRANSACTIONS_PK)
                       INDEX(txd HXC_TRANSACTION_DETAILS_FK1)*/
					   ''x''
			FROM	hxc_transactions tx
			,	hxc_transaction_details txd
			WHERE	tx.transaction_process_id	= :p_process_id
			AND	tx.type				= ''RETRIEVAL''
			AND	tx.status			= ''SUCCESS''
			AND	tx.transaction_id		= txd.transaction_id
			AND	txd.status			= ''SUCCESS''
		AND	txd.time_building_block_id	= tbb_latest.time_building_block_id
		AND     txd.time_building_block_ovn     = tbb_latest.object_version_number) ';
Line: 1832

          l_select_from := l_select_from_pa;
Line: 1838

          l_select_from := l_select_from_pay;
Line: 1889

                      hxc_generic_retrieval_pkg.g_detail_skipped.DELETE(i);
Line: 1892

	          update_rdb_status(g_temp_tc_list,
	                            'PENDING',
	                            'SKIPPED');
Line: 1895

                  g_temp_tc_list.DELETE;
Line: 1899

                      INSERT INTO hxc_rdb_process_details
                           ( timecard_id,
                             detail_id,
                             detail_ovn,
                             skipped_reason,
                             skip_level,
                             ret_user_id,
                             request_id ,
                             process)
                      VALUES ( l_skipped_tc_id(i),
                               l_skipped_bb_id (i),
                               l_skipped_bb_ovn(i),
                               l_skipped_desc(i),
                               'OTL_PROC',
                               FND_GLOBAL.user_ID,
                               FND_GLOBAL.conc_request_id,
                               g_params.p_process);
Line: 1934

            g_res_list.DELETE(l_ind);
Line: 1976

            hr_utility.TRACE ('About to delete rows');
Line: 1979

         DELETE FROM hxc_retrieval_range_blks;
Line: 1992

                  l_select_from
               || l_where
               || l_not_exists
               || l_app_set
               || l_ret_criteria_clause;
Line: 2002

                     l_select_from
                  || l_where
                  || l_day_ex
                  || l_not_exists
                  || l_app_set
                  || l_ret_criteria_clause;
Line: 2011

                     l_select_from
                  || l_where
                  || l_day_in
                  || l_not_exists
                  || l_app_set
                  || l_ret_criteria_clause;
Line: 2039

         insert_query (l_ret_range_query, 'RET_RANGE_BLKS');
Line: 2131

                  INSERT INTO hxc_retrieval_range_blks
                              (time_building_block_id, object_version_number
                              )
                       VALUES (t_tbb_id (rrx), t_tbb_ovn (rrx)
                              );
Line: 2136

               t_tbb_id.DELETE;
Line: 2137

               t_tbb_ovn.DELETE;
Line: 2176

         SELECT time_building_block_id || ':' || max_ovn ovn
           FROM hxc_max_ovn;
Line: 2183

         SELECT   /*+ ORDERED
                      INDEX(TXD HXC_TRANSACTION_DETAILS_FK1)
                      INDEX(TX HXC_TRANSACTIONS_PK)
                      USE_NL(TXD, TX) */
                  txd.time_building_block_id,
                  NVL (MAX (txd.time_building_block_ovn), 0)
             FROM hxc_retrieval_range_blks rrb,
                  hxc_transaction_details txd,
                  hxc_transactions tx
            WHERE tx.transaction_process_id = p_retrieval_process_id
              AND tx.TYPE = 'RETRIEVAL'
              AND tx.status = 'SUCCESS'
              AND tx.transaction_id = txd.transaction_id
              AND txd.status = 'SUCCESS'
              AND rrb.time_building_block_id = txd.time_building_block_id
              AND rrb.object_version_number > txd.time_building_block_ovn
         GROUP BY txd.time_building_block_id;
Line: 2208

              SELECT   txd.time_building_block_id,
                       NVL (MAX (txd.time_building_block_ovn), 0)
                  FROM hxc_transaction_details txd, hxc_transactions tx
                 WHERE tx.transaction_process_id = p_retrieval_process_id
                   AND tx.TYPE = 'RETRIEVAL'
                   AND tx.status = 'SUCCESS'
                   AND tx.transaction_id = txd.transaction_id
                   AND txd.status = 'SUCCESS'
                   AND EXISTS (
                          SELECT 'x'
                            FROM hxc_latest_details tbb_det
                           WHERE tbb_det.start_time <= p_end_date
                             AND tbb_det.stop_time >= p_start_date
                             AND tbb_det.last_update_date > p_since_date
                             AND tbb_det.time_building_block_id =
                                                         txd.time_building_block_id
                             AND tbb_det.object_version_number >
                                                        txd.time_building_block_ovn
                             AND tbb_det.resource_id BETWEEN l_pkg_range_start
                                                         AND l_pkg_range_stop)
         GROUP BY txd.time_building_block_id;
Line: 2232

              SELECT   txd.time_building_block_id,
                       NVL (MAX (txd.time_building_block_ovn), 0)
                  FROM hxc_transaction_details txd, hxc_transactions tx
                 WHERE tx.transaction_process_id = p_retrieval_process_id
                   AND tx.TYPE = 'RETRIEVAL'
                   AND tx.status = 'SUCCESS'
                   AND tx.transaction_id = txd.transaction_id
                   AND txd.status = 'SUCCESS'
                   AND EXISTS (
                          SELECT 'x'
                            FROM hxc_latest_details tbb_det
                           WHERE tbb_det.time_building_block_id =
                                                         txd.time_building_block_id
                             AND tbb_det.last_update_date > p_since_date
                             AND tbb_det.object_version_number >
                                                        txd.time_building_block_ovn
                             AND tbb_det.resource_id BETWEEN l_pkg_range_start
                                                         AND l_pkg_range_stop)
         GROUP BY txd.time_building_block_id;
Line: 2272

      DELETE FROM hxc_max_ovn;
Line: 2303

                  INSERT INTO hxc_max_ovn
                              (time_building_block_id, max_ovn
                              )
                       VALUES (t_max_ovn_bb_id (x), t_max_ovn (x)
                              );
Line: 2308

               t_max_ovn_bb_id.DELETE;
Line: 2309

               t_max_ovn.DELETE;
Line: 2339

                     INSERT INTO hxc_max_ovn
                                 (time_building_block_id, max_ovn
                                 )
                          VALUES (t_max_ovn_bb_id (x), t_max_ovn (x)
                                 );
Line: 2344

                  t_max_ovn_bb_id.DELETE;
Line: 2345

                  t_max_ovn.DELETE;
Line: 2376

                     hr_utility.TRACE ('inserting');
Line: 2380

                     INSERT INTO hxc_max_ovn
                                 (time_building_block_id, max_ovn
                                 )
                          VALUES (t_max_ovn_bb_id (x), t_max_ovn (x)
                                 );
Line: 2385

                  t_max_ovn_bb_id.DELETE;
Line: 2386

                  t_max_ovn.DELETE;
Line: 2473

      IF (p_mode = 'I')                                 -- insert transactions
      THEN
-- check to see if header already inserted
         IF (hxc_generic_retrieval_pkg.g_transaction_id IS NOT NULL)
         THEN
            IF g_debug
            THEN
               hr_utility.set_location ('Processing ' || l_proc, 7);
Line: 2484

            UPDATE hxc_transactions
               SET status = p_status,
                   exception_description = p_description
             WHERE transaction_id = hxc_generic_retrieval_pkg.g_transaction_id;
Line: 2506

            INSERT INTO hxc_transactions
                        (transaction_id,
                         transaction_process_id, transaction_date,
                         transaction_code,
                         TYPE, status, exception_description
                        )
                 VALUES (hxc_generic_retrieval_pkg.g_transaction_id,
                         p_transaction_process_id, SYSDATE,
                         NVL (g_params.p_transaction_code,
                              TO_CHAR (SYSDATE, 'DD/MM/YYYY')
                             ),
                         'RETRIEVAL', p_status, p_description
                        );
Line: 2550

               INSERT INTO hxc_transaction_details
                           (transaction_detail_id,
                            time_building_block_id,
                            time_building_block_ovn,
                            transaction_id,
                            status,
                            exception_description
                           )
                    VALUES (hxc_generic_retrieval_pkg.t_tx_error_transaction_id
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.t_tx_error_bb_id
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.t_tx_error_bb_ovn
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.g_transaction_id,
                            hxc_generic_retrieval_pkg.t_tx_error_status
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.t_tx_error_exception
                                                                     (tx_error)
                           );
Line: 2575

            hxc_generic_retrieval_pkg.t_tx_error_transaction_id.DELETE;
Line: 2576

            hxc_generic_retrieval_pkg.t_tx_error_bb_id.DELETE;
Line: 2577

            hxc_generic_retrieval_pkg.t_tx_error_bb_ovn.DELETE;
Line: 2578

            hxc_generic_retrieval_pkg.t_tx_error_status.DELETE;
Line: 2579

            hxc_generic_retrieval_pkg.t_tx_error_exception.DELETE;
Line: 2586

      ELSIF (p_mode = 'U')                              -- update transactions
      THEN
         IF g_debug
         THEN
            hr_utility.set_location ('Processing ' || l_proc, 110);
Line: 2600

         INSERT INTO hxc_transactions
                     (transaction_id, transaction_process_id,
                      transaction_date, TYPE, status,
                      exception_description
                     )
              VALUES (l_tx_id, p_transaction_process_id,
                      SYSDATE, 'RETRIEVAL_STATUS_UPDATE', p_status,
                      p_description
                     );
Line: 2614

            UPDATE hxc_transactions
               SET status = p_status
             WHERE transaction_id = hxc_generic_retrieval_pkg.g_transaction_id;
Line: 2620

            UPDATE hxc_transactions
               SET status = p_status,
                   exception_description = p_description
             WHERE transaction_id = hxc_generic_retrieval_pkg.g_transaction_id;
Line: 2651

               INSERT INTO hxc_transaction_details
                           (transaction_detail_id,
                            time_building_block_id,
                            time_building_block_ovn,
                            transaction_id,
                            status,
                            exception_description
                           )
                    VALUES (hxc_generic_retrieval_pkg.t_tx_time_transaction_id
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_time_bb_id
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_time_bb_ovn
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.g_transaction_id,
                            hxc_generic_retrieval_pkg.t_tx_time_status
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_time_exception
                                                                    (tx_detail)
                           );
Line: 2693

               INSERT INTO hxc_transaction_details
                           (transaction_detail_id,
                            time_building_block_id,
                            time_building_block_ovn,
                            transaction_id,
                            status,
                            exception_description
                           )
                    VALUES (hxc_generic_retrieval_pkg.t_tx_day_transaction_id
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_day_bb_id
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_day_bb_ovn
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.g_transaction_id,
                            hxc_generic_retrieval_pkg.t_tx_day_status
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_day_exception
                                                                    (tx_detail)
                           );
Line: 2735

               INSERT INTO hxc_transaction_details
                           (transaction_detail_id,
                            time_building_block_id,
                            time_building_block_ovn,
                            transaction_id,
                            status,
                            exception_description
                           )
                    VALUES (hxc_generic_retrieval_pkg.t_tx_detail_transaction_id
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_detail_bb_id
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_detail_bb_ovn
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.g_transaction_id,
                            hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_detail),
                            hxc_generic_retrieval_pkg.t_tx_detail_exception
                                                                    (tx_detail)
                           );
Line: 2791

               INSERT INTO hxc_transaction_details
                           (transaction_detail_id,
                            time_building_block_id,
                            time_building_block_ovn,
                            transaction_id,
                            status,
                            exception_description
                           )
                    VALUES (hxc_generic_retrieval_pkg.t_tx_error_transaction_id
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.t_tx_error_bb_id
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.t_tx_error_bb_ovn
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.g_transaction_id,
                            hxc_generic_retrieval_pkg.t_tx_error_status
                                                                     (tx_error),
                            hxc_generic_retrieval_pkg.t_tx_error_exception
                                                                     (tx_error)
                           );
Line: 2814

            g_temp_tc_list.DELETE;
Line: 2819

              UPDATE hxc_rdb_process_details
                 SET skipped_reason = SUBSTR(hxc_generic_retrieval_pkg.t_tx_error_exception
                                                                     (tx_error),1,149),
                     skip_level = 'REC_PROC'
                WHERE detail_id = hxc_generic_retrieval_pkg.t_tx_error_bb_id
                                                                     (tx_error)
                 AND request_id = FND_GLOBAL.CONC_REQUEST_ID
                 AND process = g_params.p_process
                 AND ret_user_id = FND_global.user_id
           RETURNING timecard_id
                BULK COLLECT INTO g_temp_tc_list ;
Line: 2832

              UPDATE hxc_rdb_process_timecards
                 SET stage = 'ERRORED'
               WHERE timecard_id = g_temp_tc_list(i)
                 AND request_id = FND_GLOBAL.CONC_REQUEST_ID
                 AND process = g_params.p_process;
Line: 2841

            hxc_generic_retrieval_pkg.t_tx_error_transaction_id.DELETE;
Line: 2842

            hxc_generic_retrieval_pkg.t_tx_error_bb_id.DELETE;
Line: 2843

            hxc_generic_retrieval_pkg.t_tx_error_bb_ovn.DELETE;
Line: 2844

            hxc_generic_retrieval_pkg.t_tx_error_status.DELETE;
Line: 2845

            hxc_generic_retrieval_pkg.t_tx_error_exception.DELETE;
Line: 2889

         SELECT -1, rtr.time_recipient_id, rtr.mapping_id
           FROM hxc_retrieval_processes rtr
          WHERE rtr.NAME = 'BEE Retrieval Process';
Line: 2895

         SELECT rtr.retrieval_process_id, rtr.time_recipient_id,
                rtr.mapping_id
           FROM hxc_retrieval_processes rtr
          WHERE rtr.NAME = p_retrieval_process;
Line: 2982

            t_bb (l_ind).time_deleted := t_timecard_deleted (x);
Line: 3000

            t_bb (l_ind).detail_deleted := t_detail_deleted (x);
Line: 3071

         t_timecard_bb_id.DELETE;
Line: 3072

         t_timecard_ovn.DELETE;
Line: 3073

         t_timecard_max_ovn.DELETE;
Line: 3074

         t_timecard_start_time.DELETE;
Line: 3075

         t_timecard_stop_time.DELETE;
Line: 3076

         t_timecard_comment_text.DELETE;
Line: 3077

         t_timecard_deleted.DELETE;
Line: 3078

         t_day_bb_id.DELETE;
Line: 3079

         t_day_start_time.DELETE;
Line: 3080

         t_day_stop_time.DELETE;
Line: 3081

         t_day_ovn.DELETE;
Line: 3082

         t_day_max_ovn.DELETE;
Line: 3083

         t_detail_bb_id.DELETE;
Line: 3084

         t_detail_parent_id.DELETE;
Line: 3085

         t_detail_resource_type.DELETE;
Line: 3086

         t_detail_resource_id.DELETE;
Line: 3087

         t_detail_comment_text.DELETE;
Line: 3088

         t_detail_start_time.DELETE;
Line: 3089

         t_detail_stop_time.DELETE;
Line: 3090

         t_detail_measure.DELETE;
Line: 3091

         t_detail_scope.DELETE;
Line: 3092

         t_detail_type.DELETE;
Line: 3093

         t_detail_ovn.DELETE;
Line: 3094

         t_detail_deleted.DELETE;
Line: 3095

         t_detail_max_ovn.DELETE;
Line: 3096

         t_detail_uom.DELETE;
Line: 3097

         t_detail_date_from.DELETE;
Line: 3098

         t_detail_date_to.DELETE;
Line: 3099

         t_detail_approval_status.DELETE;
Line: 3100

         t_detail_approval_style_id.DELETE;
Line: 3101

         t_detail_ta_id.DELETE;
Line: 3102

         t_detail_bld_blk_info_type_id.DELETE;
Line: 3103

         t_detail_attribute1.DELETE;
Line: 3104

         t_detail_attribute2.DELETE;
Line: 3105

         t_detail_attribute3.DELETE;
Line: 3106

         t_detail_attribute4.DELETE;
Line: 3107

         t_detail_attribute5.DELETE;
Line: 3108

         t_detail_attribute6.DELETE;
Line: 3109

         t_detail_attribute7.DELETE;
Line: 3110

         t_detail_attribute8.DELETE;
Line: 3111

         t_detail_attribute9.DELETE;
Line: 3112

         t_detail_attribute10.DELETE;
Line: 3113

         t_detail_attribute11.DELETE;
Line: 3114

         t_detail_attribute12.DELETE;
Line: 3115

         t_detail_attribute13.DELETE;
Line: 3116

         t_detail_attribute14.DELETE;
Line: 3117

         t_detail_attribute15.DELETE;
Line: 3118

         t_detail_attribute16.DELETE;
Line: 3119

         t_detail_attribute17.DELETE;
Line: 3120

         t_detail_attribute18.DELETE;
Line: 3121

         t_detail_attribute19.DELETE;
Line: 3122

         t_detail_attribute20.DELETE;
Line: 3123

         t_detail_attribute21.DELETE;
Line: 3124

         t_detail_attribute22.DELETE;
Line: 3125

         t_detail_attribute23.DELETE;
Line: 3126

         t_detail_attribute24.DELETE;
Line: 3127

         t_detail_attribute25.DELETE;
Line: 3128

         t_detail_attribute26.DELETE;
Line: 3129

         t_detail_attribute27.DELETE;
Line: 3130

         t_detail_attribute28.DELETE;
Line: 3131

         t_detail_attribute29.DELETE;
Line: 3132

         t_detail_attribute30.DELETE;
Line: 3133

         t_detail_attribute_category.DELETE;
Line: 4468

         SELECT COUNT (*)
           FROM hxc_time_building_blocks
          WHERE SCOPE = 'TIMECARD';
Line: 4474

    SELECT value
    FROM nls_session_parameters
    WHERE parameter = 'NLS_NUMERIC_CHARACTERS';
Line: 4497

         UPDATE hxc_rdb_process_timecards
            SET stage = 'SKIPPED'
          WHERE ret_user_id = FND_GLOBAL.user_id
            AND request_id = FND_GLOBAL.conc_request_id
            AND process = g_params.p_process
            AND stage = 'PENDING';
Line: 4664

               hxc_generic_retrieval_pkg.t_detail_bld_blks (l_bld_blk_index).deleted :=
                                                   t_bb (p_cnt).detail_deleted;
Line: 5205

                             c_tab            => t_detail_deleted,
                             cnt              => l_max_array_size,
                             lower_bound      => 1
                            );
Line: 5259

                             c_tab            => t_timecard_deleted,
                             cnt              => l_max_array_size,
                             lower_bound      => 1
                            );
Line: 5508

                                c_tab         => t_detail_deleted
                               );
Line: 5544

                                c_tab         => t_timecard_deleted
                               );
Line: 5596

      l_prefs.DELETE;
Line: 5597

      l_ret_rules.DELETE;
Line: 5598

      l_rtr_outcomes.DELETE;
Line: 5693

            t_time_bld_blk_info.DELETE;
Line: 5707

            t_day_bld_blk_info.DELETE;
Line: 5726

            t_detail_bld_blk_info.DELETE;
Line: 5736

            IF (    t_bb (cnt).detail_deleted = 'Y'
                AND t_bb (cnt).detail_max_ovn = 0
               )
            THEN
               l_day_retrieve := FALSE;
Line: 5760

                                                                'Y',                   -- Bug 8366309;  Deleted = 'Y'
Line: 5805

                             p_bb_deleted             => t_bb (cnt).time_deleted,
                             p_bb_start_time          => t_bb (cnt).day_start_time,
                             p_bb_stop_time           => t_bb (cnt).day_stop_time,
                             p_bb_id                  => t_bb (cnt).detail_bb_id,
                             p_bb_ovn                 => t_bb (cnt).detail_ovn,
                             p_attribute_category     => l_detail_attribute_category,   -- Bug 8779478
                             p_process                => g_params.p_process,
                             p_prefs                  => l_prefs,
                             p_ret_rules              => l_ret_rules,
                             p_rtr_outcomes           => l_rtr_outcomes,
                             p_tc_bb_id               => t_bb (cnt).time_bb_id,
                             p_tc_bb_ovn              => t_bb (cnt).time_ovn,
                             p_timecard_retrieve      => l_timecard_retrieve,
                             p_day_retrieve           => l_day_retrieve,
                             p_tc_locked              => l_tc_locked,
                             p_tc_first_lock          => l_tc_first_lock,
                             p_bb_skipped_reason      => l_bb_skipped_reason   -- Bug 7595581
                            );
Line: 5824

            END IF;                         -- chk deleted and not transferred
Line: 5835

	    		l_bb_skipped_reason := 'Block is deleted and was not transferred earlier';
Line: 6059

      t_bb.DELETE;
Line: 6068

         hxc_generic_retrieval_utils.g_resources.DELETE;
Line: 6073

                         (p_mode                        => 'I'       -- Insert
                                                              ,
                          p_transaction_process_id      => g_retrieval_process_id,
                          p_status                      => 'WARNINGS',
                          p_description                 => 'HXC_0012_GNRET_NO_TIMECARDS'
                         );
Line: 6089

         t_bb.DELETE;
Line: 6090

         hxc_generic_retrieval_utils.g_resources.DELETE;
Line: 6095

                         (p_mode                        => 'I'       -- Insert
                                                              ,
                          p_transaction_process_id      => g_retrieval_process_id,
                          p_status                      => 'WARNINGS',
                          p_description                 => 'HXC_0013_GNRET_NO_BLD_BLKS'
                         );
Line: 6105

                         (p_mode                        => 'I'       -- Insert
                                                              ,
                          p_transaction_process_id      => g_retrieval_process_id,
                          p_status                      => 'WARNINGS',
                          p_description                 => 'HXC_0013_GNRET_NO_BLD_BLKS'
                         );
Line: 6120

                         (p_mode                        => 'I'       -- Insert
                                                              ,
                          p_transaction_process_id      => g_retrieval_process_id,
                          p_status                      => 'WARNINGS',
                          p_description                 => SUBSTR (SQLERRM,
                                                                   1,
                                                                   2000
                                                                  )
                         );
Line: 6152

         SELECT 'x'
           FROM hxc_tmp_bld_blks;
Line: 6157

         SELECT   /*+ ORDERED  INDEX(TBB) INDEX(DAY) USE_NL(TBB, DAY) */
                  tbb.time_building_block_id, tbb.object_version_number,
                  tbb.parent_building_block_id, tbb.resource_type,
                  tbb.resource_id, tbb.comment_text,
                  DECODE (tbb.TYPE,
                          'MEASURE', DAY.start_time,
                          tbb.start_time
                         ),
                  DECODE (tbb.TYPE, 'MEASURE', DAY.stop_time, tbb.stop_time),
                  DECODE (tbb.TYPE,
                          'MEASURE', tbb.measure,
                          (tbb.stop_time - tbb.start_time
                          ) * 24
                         ),
                  tbb.SCOPE, tbb.TYPE,
                  DECODE (tbb.TYPE, 'MEASURE', tbb.unit_of_measure, 'HOURS'),
                  tbb.date_from, tbb.date_to, tbb.approval_status,
                  tbb.approval_style_id
             FROM hxc_tmp_bld_blks tmp,
                  hxc_time_building_blocks tbb,
                  hxc_time_building_blocks DAY
            WHERE tbb.time_building_block_id = tmp.time_building_block_id
              AND tbb.object_version_number = tmp.time_building_block_ovn
              AND DAY.time_building_block_id = tbb.parent_building_block_id
              AND DAY.object_version_number = tbb.parent_building_block_ovn
         ORDER BY tmp.seq;
Line: 6186

         SELECT   /*+ ORDERED  INDEX(TAU) INDEX(TA) USE_NL(TAU, TA) */
                  tmp.time_building_block_id, ta.bld_blk_info_type_id,
                  ta.attribute_category, ta.attribute1, ta.attribute2,
                  ta.attribute3, ta.attribute4, ta.attribute5, ta.attribute6,
                  ta.attribute7, ta.attribute8, ta.attribute9, ta.attribute10,
                  ta.attribute11, ta.attribute12, ta.attribute13,
                  ta.attribute14, ta.attribute15, ta.attribute16,
                  ta.attribute17, ta.attribute18, ta.attribute19,
                  ta.attribute20, ta.attribute21, ta.attribute22,
                  ta.attribute23, ta.attribute24, ta.attribute25,
                  ta.attribute26, ta.attribute27, ta.attribute28,
                  ta.attribute29, ta.attribute30
             FROM hxc_tmp_bld_blks tmp,
                  hxc_time_attribute_usages tau,
                  hxc_time_attributes ta
            WHERE tau.time_building_block_id = tmp.time_building_block_id
              AND tau.time_building_block_ovn = tmp.time_building_block_ovn
              AND ta.time_attribute_id = tau.time_attribute_id
         ORDER BY tmp.seq;
Line: 6432

               INSERT INTO hxc_tmp_bld_blks
                           (seq, time_building_block_id,
                            time_building_block_ovn
                           )
                    VALUES (t_old_detail_seq (x), t_old_detail_bb_id (x),
                            t_old_detail_ovn (x)
                           );
Line: 6684

            t_bb.DELETE;
Line: 6685

            t_old_bb_id.DELETE;
Line: 6686

            t_old_att_bb_id.DELETE;
Line: 6687

            t_old_parent_id.DELETE;
Line: 6688

            t_old_resource_type.DELETE;
Line: 6689

            t_old_resource_id.DELETE;
Line: 6690

            t_old_comment_text.DELETE;
Line: 6691

            t_old_start_time.DELETE;
Line: 6692

            t_old_stop_time.DELETE;
Line: 6693

            t_old_measure.DELETE;
Line: 6694

            t_old_scope.DELETE;
Line: 6695

            t_old_type.DELETE;
Line: 6696

            t_old_uom.DELETE;
Line: 6697

            t_old_date_from.DELETE;
Line: 6698

            t_old_date_to.DELETE;
Line: 6699

            t_old_approval_status.DELETE;
Line: 6700

            t_old_approval_style_id.DELETE;
Line: 6701

            t_old_bld_blk_info_type_id.DELETE;
Line: 6702

            t_old_attribute1.DELETE;
Line: 6703

            t_old_attribute2.DELETE;
Line: 6704

            t_old_attribute3.DELETE;
Line: 6705

            t_old_attribute4.DELETE;
Line: 6706

            t_old_attribute5.DELETE;
Line: 6707

            t_old_attribute6.DELETE;
Line: 6708

            t_old_attribute7.DELETE;
Line: 6709

            t_old_attribute8.DELETE;
Line: 6710

            t_old_attribute9.DELETE;
Line: 6711

            t_old_attribute10.DELETE;
Line: 6712

            t_old_attribute11.DELETE;
Line: 6713

            t_old_attribute12.DELETE;
Line: 6714

            t_old_attribute13.DELETE;
Line: 6715

            t_old_attribute14.DELETE;
Line: 6716

            t_old_attribute15.DELETE;
Line: 6717

            t_old_attribute16.DELETE;
Line: 6718

            t_old_attribute17.DELETE;
Line: 6719

            t_old_attribute18.DELETE;
Line: 6720

            t_old_attribute19.DELETE;
Line: 6721

            t_old_attribute20.DELETE;
Line: 6722

            t_old_attribute21.DELETE;
Line: 6723

            t_old_attribute22.DELETE;
Line: 6724

            t_old_attribute23.DELETE;
Line: 6725

            t_old_attribute24.DELETE;
Line: 6726

            t_old_attribute25.DELETE;
Line: 6727

            t_old_attribute26.DELETE;
Line: 6728

            t_old_attribute27.DELETE;
Line: 6729

            t_old_attribute28.DELETE;
Line: 6730

            t_old_attribute29.DELETE;
Line: 6731

            t_old_attribute30.DELETE;
Line: 6826

         SELECT 'Y'
           FROM hxc_debug
          WHERE process = 'RETRIEVAL' AND TRUNC (debug_date) =
                                                              TRUNC (SYSDATE);
Line: 6890

SELECT /*+ ordered use_nl( tbb
             detail_block detail_usage detail_att
             day_block timecard_block
             detail_max_ovn ) */ ';
Line: 6894

         l_incremental_select    VARCHAR2 (1860)
            := '
	timecard_block.time_building_block_id
,	timecard_block.object_version_number
,	day_block.time_building_block_id
,	day_block.object_version_number
,	day_block.start_time
,	day_block.stop_time
,	detail_block.time_building_block_id
,	detail_block.object_version_number
,	detail_block.parent_building_block_id
,	detail_block.resource_type
,	detail_block.resource_id
,	detail_block.comment_text
,	detail_block.start_time
,	detail_block.stop_time
,	detail_block.measure
,	detail_block.scope
,	detail_block.type
,	detail_att.time_attribute_id
,	detail_att.bld_blk_info_type_id
,	detail_att.attribute1
,	detail_att.attribute2
,	detail_att.attribute3
,	detail_att.attribute4
,	detail_att.attribute5
,	detail_att.attribute6
,	detail_att.attribute7
,	detail_att.attribute8
,	detail_att.attribute9
,	detail_att.attribute10
,	detail_att.attribute11
,	detail_att.attribute12
,	detail_att.attribute13
,	detail_att.attribute14
,	detail_att.attribute15
,	detail_att.attribute16
,	detail_att.attribute17
,	detail_att.attribute18
,	detail_att.attribute19
,	detail_att.attribute20
,	detail_att.attribute21
,	detail_att.attribute22
,	detail_att.attribute23
,	detail_att.attribute24
,	detail_att.attribute25
,	detail_att.attribute26
,	detail_att.attribute27
,	detail_att.attribute28
,	detail_att.attribute29
,	detail_att.attribute30
,	detail_block.date_from
,	detail_block.date_to
,	detail_block.approval_status
,	detail_block.approval_style_id
,	DECODE ( detail_block.date_to, hr_general.end_of_time, ''N'', ''Y'' )
,	detail_att.attribute_category
,       1
,       1
,       NVL(detail_max_ovn.max_ovn, 0)
,	detail_block.unit_of_measure
,	timecard_block.start_time
,	timecard_block.stop_time
,       timecard_block.comment_text
,	DECODE ( timecard_block.date_to, hr_general.end_of_time, ''N'', ''Y'' ) ';
Line: 6959

         l_select                VARCHAR2 (1945)
            := '
SELECT /*+ ordered use_nl(
             detail_block detail_usage detail_att
             day_block timecard_block
             detail_max_ovn ) */
	timecard_block.time_building_block_id
,	timecard_block.object_version_number
,	day_block.time_building_block_id
,	day_block.object_version_number
,	day_block.start_time
,	day_block.stop_time
,	detail_block.time_building_block_id
,	detail_block.object_version_number
,	detail_block.parent_building_block_id
,	detail_block.resource_type
,	detail_block.resource_id
,	detail_block.comment_text
,	detail_block.start_time
,	detail_block.stop_time
,	detail_block.measure
,	detail_block.scope
,	detail_block.type
,	detail_att.time_attribute_id
,	detail_att.bld_blk_info_type_id
,	detail_att.attribute1
,	detail_att.attribute2
,	detail_att.attribute3
,	detail_att.attribute4
,	detail_att.attribute5
,	detail_att.attribute6
,	detail_att.attribute7
,	detail_att.attribute8
,	detail_att.attribute9
,	detail_att.attribute10
,	detail_att.attribute11
,	detail_att.attribute12
,	detail_att.attribute13
,	detail_att.attribute14
,	detail_att.attribute15
,	detail_att.attribute16
,	detail_att.attribute17
,	detail_att.attribute18
,	detail_att.attribute19
,	detail_att.attribute20
,	detail_att.attribute21
,	detail_att.attribute22
,	detail_att.attribute23
,	detail_att.attribute24
,	detail_att.attribute25
,	detail_att.attribute26
,	detail_att.attribute27
,	detail_att.attribute28
,	detail_att.attribute29
,	detail_att.attribute30
,	detail_block.date_from
,	detail_block.date_to
,	detail_block.approval_status
,	detail_block.approval_style_id
,	DECODE ( detail_block.date_to, hr_general.end_of_time, ''N'', ''Y'' )
,	detail_att.attribute_category
,       1
,       1
,	detail_block.object_version_number -1
,	detail_block.unit_of_measure
,	timecard_block.start_time
,	timecard_block.stop_time
,       timecard_block.comment_text
,	DECODE ( timecard_block.date_to, hr_general.end_of_time, ''N'', ''Y'' ) ';
Line: 7039

	(select /*+ no_merge ordered */
        time_building_block_id,
	object_version_number
from 	Hxc_latest_details tbb_latest
where	tbb_latest.resource_id BETWEEN :p_lower_range and :p_upper_range
and     tbb_latest.approval_status <> ''ERROR''
AND	NOT EXISTS (select ''x''
			FROM	hxc_transaction_details txd
			,	hxc_transactions tx
			WHERE	tx.transaction_process_id	= :p_process_id
			AND	tx.type				= ''RETRIEVAL''
			AND	tx.status			= ''SUCCESS''
			AND	tx.transaction_id		= txd.transaction_id
			AND	txd.status			= ''SUCCESS''
		AND	txd.time_building_block_id	= tbb_latest.time_building_block_id
		AND     txd.time_building_block_ovn     = tbb_latest.object_version_number
		)

';
Line: 7063

	(select /*+ no_merge ordered */
        time_building_block_id,
	object_version_number
from 	Hxc_pa_latest_details tbb_latest
where	tbb_latest.resource_id BETWEEN :p_lower_range and :p_upper_range
and     tbb_latest.approval_status <> ''ERROR''
AND	NOT EXISTS (select ''x''
			FROM	hxc_transaction_details txd
			,	hxc_transactions tx
			WHERE	tx.transaction_process_id	= :p_process_id
			AND	tx.type				= ''RETRIEVAL''
			AND	tx.status			= ''SUCCESS''
			AND	tx.transaction_id		= txd.transaction_id
			AND	txd.status			= ''SUCCESS''
		AND	txd.time_building_block_id	= tbb_latest.time_building_block_id
		AND     txd.time_building_block_ovn     = tbb_latest.object_version_number
		)
';
Line: 7085

	(select /*+ no_merge ordered */
        time_building_block_id,
	object_version_number
from 	Hxc_pay_latest_details tbb_latest
where	tbb_latest.resource_id BETWEEN :p_lower_range and :p_upper_range
and     tbb_latest.approval_status <> ''ERROR''
AND	NOT EXISTS (select ''x''
			FROM	hxc_transaction_details txd
			,	hxc_transactions tx
			WHERE	tx.transaction_process_id	= :p_process_id
			AND	tx.type				= ''RETRIEVAL''
			AND	tx.status			= ''SUCCESS''
			AND	tx.transaction_id		= txd.transaction_id
			AND	txd.status			= ''SUCCESS''
		AND	txd.time_building_block_id	= tbb_latest.time_building_block_id
		AND     txd.time_building_block_ovn     = tbb_latest.object_version_number
		)
';
Line: 7109

	 	(select /*+ no_merge ordered */
	         tbb_latest.time_building_block_id,
	 	tbb_latest.object_version_number
	 from 	hxc_retrieval_ranges rr,
	         hxc_retrieval_range_resources rrr,
	         hxc_latest_details tbb_latest
	 where	rr.retrieval_range_id = :p_rr_id AND
	         rr.retrieval_range_id = rrr.retrieval_range_id AND
	         tbb_latest.resource_id = rrr.resource_id AND
	         tbb_latest.last_update_date > :p_since_date
	         AND tbb_latest.approval_status <> ''ERROR''
	 AND	NOT EXISTS (select ''x''
	 			FROM	hxc_transaction_details txd
	 			,	hxc_transactions tx
	 			WHERE	tx.transaction_process_id	= :p_process_id
	 			AND	tx.type				= ''RETRIEVAL''
	 			AND	tx.status			= ''SUCCESS''
	 			AND	tx.transaction_id		= txd.transaction_id
	 			AND	txd.status			= ''SUCCESS''
	 		AND	txd.time_building_block_id	= tbb_latest.time_building_block_id
	 		AND     txd.time_building_block_ovn     = tbb_latest.object_version_number
	 		)
';
Line: 7136

	 	(select /*+ no_merge ordered */
	         tbb_latest.time_building_block_id,
	 	tbb_latest.object_version_number
	 from 	hxc_retrieval_ranges rr,
	         hxc_retrieval_range_resources rrr,
	         hxc_pa_latest_details tbb_latest
	 where	rr.retrieval_range_id = :p_rr_id AND
	         rr.retrieval_range_id = rrr.retrieval_range_id AND
	         tbb_latest.resource_id = rrr.resource_id AND
	         tbb_latest.last_update_date > :p_since_date
	         AND tbb_latest.approval_status <> ''ERROR''
	 AND	NOT EXISTS (select ''x''
	 			FROM	hxc_transaction_details txd
	 			,	hxc_transactions tx
	 			WHERE	tx.transaction_process_id	= :p_process_id
	 			AND	tx.type				= ''RETRIEVAL''
	 			AND	tx.status			= ''SUCCESS''
	 			AND	tx.transaction_id		= txd.transaction_id
	 			AND	txd.status			= ''SUCCESS''
	 		AND	txd.time_building_block_id	= tbb_latest.time_building_block_id
	 		AND     txd.time_building_block_ovn     = tbb_latest.object_version_number
	 		)
';
Line: 7163

	 	(select /*+ no_merge ordered */
	         tbb_latest.time_building_block_id,
	 	tbb_latest.object_version_number
	 from 	hxc_retrieval_ranges rr,
	         hxc_retrieval_range_resources rrr,
	         hxc_pay_latest_details tbb_latest
	 where	rr.retrieval_range_id = :p_rr_id AND
	         rr.retrieval_range_id = rrr.retrieval_range_id AND
	         tbb_latest.resource_id = rrr.resource_id AND
	         tbb_latest.last_update_date > :p_since_date
	         AND tbb_latest.approval_status <> ''ERROR''
	 AND	NOT EXISTS (select ''x''
	 			FROM	hxc_transaction_details txd
	 			,	hxc_transactions tx
	 			WHERE	tx.transaction_process_id	= :p_process_id
	 			AND	tx.type				= ''RETRIEVAL''
	 			AND	tx.status			= ''SUCCESS''
	 			AND	tx.transaction_id		= txd.transaction_id
	 			AND	txd.status			= ''SUCCESS''
	 		AND	txd.time_building_block_id	= tbb_latest.time_building_block_id
	 		AND     txd.time_building_block_ovn     = tbb_latest.object_version_number
	 		)
';
Line: 7214

                SELECT  /*+ no_unnest */ MAX ( tovn.object_version_number )
                FROM    hxc_time_building_blocks tovn
                WHERE   tovn.time_building_block_id = timecard_block.time_building_block_id ) ';
Line: 7250

                SELECT   /*+ no_unnest */ MAX ( tovn.object_version_number )
                FROM    hxc_time_building_blocks tovn
                WHERE   tovn.time_building_block_id = timecard_block.time_building_block_id )
AND
        timecard_block.start_time
        BETWEEN :p_start_date AND :p_end_date AND
        timecard_block.stop_time
        BETWEEN :p_start_date AND :p_end_date ';
Line: 7264

                SELECT   /*+ no_unnest */ MAX ( tovn.object_version_number )
		FROM    hxc_time_building_blocks tovn
                WHERE   tovn.time_building_block_id = timecard_block.time_building_block_id )
        AND
        :p_start_date   <=      timecard_block.stop_time   AND
        :p_end_date     >=      timecard_block.start_time ';
Line: 7278

                SELECT  /*+ no_unnest */ MAX ( dyovn.object_version_number )
		FROM    hxc_time_building_blocks dyovn
                WHERE   dyovn.time_building_block_id = day_block.time_building_block_id ) ';
Line: 7395

            l_time_store_query := l_select || l_rerun || l_order_by;
Line: 7458

                     || l_incremental_select
                     || l_incremental_from
                     || l_time_store_query
                     || l_not_exists
                     || l_latest_double_check
                     || l_order_by;
Line: 7473

                     || l_incremental_select
                     || l_incremental_from
                     || l_time_store_query
                     || p_where_clause_blk
                     || p_where_clause_att
                     || l_not_exists
                     || l_latest_double_check
                     || l_order_by;
Line: 7487

                     || l_incremental_select
                     || l_inline_view_range
                     || l_inline_day
                     || l_app_set
                     || p_where_clause_blk
                     || l_noloop_from
                     || l_time_store_query
                     || p_where_clause_att
                     || l_not_exists
                     || l_order_by;
Line: 7505

                     l_select
                  || l_from
                  || l_time_store_query
                  || l_app_set
                  || p_where_clause_blk
                  || p_where_clause_att
                  || l_order_by;
Line: 7528

            SELECT transaction_id
              FROM hxc_transactions tx
             WHERE transaction_process_id = p_process_id
               AND status = 'IN PROGRESS';
Line: 7539

            SELECT 'x'
              FROM hxc_retrieval_ranges rr
             WHERE rr.transaction_id = p_transaction_id
               AND (   rr.where_clause = p_where_clause
                    OR (p_where_clause IS NULL AND rr.where_clause IS NULL)
                   )
               AND (   rr.unique_params = p_unique_params
                    OR (p_unique_params IS NULL AND rr.unique_params IS NULL
                       )
                   );
Line: 7552

            SELECT TO_CHAR (SYSDATE, 'HH24:MI:SS DD-MON-YY')
              FROM hxc_retrieval_ranges
             WHERE transaction_id = p_transaction_id;
Line: 7701

            SELECT 'x'
              FROM hxc_data_sets hds
             WHERE hds.start_date <= p_end_date
               AND hds.end_date >= p_start_date
               AND hds.status IN
                      ('OFF_LINE', 'RESTORE_IN_PROGRESS',
                       'BACKUP_IN_PROGRESS');
Line: 7760

            SELECT   mpc.bld_blk_info_type_id, UPPER (mpc.field_name),
                     mpc.SEGMENT, bbit.bld_blk_info_type CONTEXT,
                     bbitu.building_block_category CATEGORY
                FROM hxc_bld_blk_info_type_usages bbitu,
                     hxc_bld_blk_info_types bbit,
                     hxc_mapping_components mpc,
                     hxc_mapping_comp_usages mcu,
                     hxc_mappings MAP
               WHERE MAP.mapping_id = p_mapping_id
                 AND mcu.mapping_id = MAP.mapping_id
                 AND mpc.mapping_component_id = mcu.mapping_component_id
                 AND bbit.bld_blk_info_type_id = mpc.bld_blk_info_type_id
                 AND bbitu.bld_blk_info_type_id = bbit.bld_blk_info_type_id
            ORDER BY 1, 2, 3;
Line: 7849

         hxc_generic_retrieval_pkg.t_detail_bld_blks.DELETE;
Line: 7850

         hxc_generic_retrieval_pkg.t_old_detail_bld_blks.DELETE;
Line: 7851

         hxc_generic_retrieval_pkg.t_detail_attributes.DELETE;
Line: 7852

         hxc_generic_retrieval_pkg.t_old_detail_attributes.DELETE;
Line: 7853

         hxc_generic_retrieval_pkg.t_time_bld_blks.DELETE;
Line: 7854

         t_old_detail_seq.DELETE;
Line: 7855

         t_old_detail_bb_id.DELETE;
Line: 7856

         t_old_detail_ovn.DELETE;
Line: 7857

         hxc_generic_retrieval_pkg.t_tx_time_bb_id.DELETE;
Line: 7858

         hxc_generic_retrieval_pkg.t_tx_time_bb_ovn.DELETE;
Line: 7859

         hxc_generic_retrieval_pkg.t_tx_time_transaction_id.DELETE;
Line: 7860

         hxc_generic_retrieval_pkg.t_tx_time_status.DELETE;
Line: 7861

         hxc_generic_retrieval_pkg.t_tx_time_exception.DELETE;
Line: 7862

         hxc_generic_retrieval_pkg.t_tx_day_bb_id.DELETE;
Line: 7863

         hxc_generic_retrieval_pkg.t_tx_day_parent_id.DELETE;
Line: 7864

         hxc_generic_retrieval_pkg.t_tx_day_bb_ovn.DELETE;
Line: 7865

         hxc_generic_retrieval_pkg.t_tx_day_transaction_id.DELETE;
Line: 7866

         hxc_generic_retrieval_pkg.t_tx_day_status.DELETE;
Line: 7867

         hxc_generic_retrieval_pkg.t_tx_day_exception.DELETE;
Line: 7868

         hxc_generic_retrieval_pkg.t_tx_detail_bb_id.DELETE;
Line: 7869

         hxc_generic_retrieval_pkg.t_tx_detail_parent_id.DELETE;
Line: 7870

         hxc_generic_retrieval_pkg.t_tx_detail_bb_ovn.DELETE;
Line: 7871

         hxc_generic_retrieval_pkg.t_tx_detail_transaction_id.DELETE;
Line: 7872

         hxc_generic_retrieval_pkg.t_tx_detail_status.DELETE;
Line: 7873

         hxc_generic_retrieval_pkg.t_tx_detail_exception.DELETE;
Line: 7877

         hxc_generic_retrieval_pkg.t_detail_rec_lines.DELETE;
Line: 7878

         hxc_generic_retrieval_pkg.t_old_detail_rec_lines.DELETE;
Line: 7879

         hxc_generic_retrieval_pkg.g_old_bb_ids.DELETE;
Line: 7880

         hxc_generic_retrieval_pkg.t_bb.DELETE;
Line: 7882

         hxc_generic_retrieval_utils.g_resources.DELETE;
Line: 7887

	 hxc_generic_retrieval_pkg.g_detail_skipped.DELETE;
Line: 7893

            g_field_mappings_table.DELETE;
Line: 7919

            SELECT DISTINCT application_set_id
                       FROM hxc_application_set_comps_v
                      WHERE time_recipient_id IN
                                              (p_ret_tr_id_1, p_ret_tr_id_2);
Line: 7926

            SELECT tr.time_recipient_id
              FROM hxc_time_recipients tr
             WHERE tr.application_id = p_application_id;
Line: 8062

               SELECT TO_NUMBER (l_since_date)
                 INTO l_since_date
                 FROM DUAL;
Line: 8299

               SELECT rp.retrieval_process_id
                 INTO l_ret_id
                 FROM hxc_retrieval_processes rp
                WHERE rp.NAME = 'BEE Retrieval Process';
Line: 8383

                          (p_mode                        => 'I'      -- Insert
                                                               ,
                           p_transaction_process_id      => g_retrieval_process_id,
                           p_status                      => 'IN PROGRESS',
                           p_description                 => ''
                          );
Line: 8443

         insert_query (l_dynamic_query, 'QUERY');
Line: 8556

                           (p_mode                        => 'I'     -- Insert
                                                                ,
                            p_transaction_process_id      => g_retrieval_process_id,
                            p_status                      => 'ERRORS',
                            p_description                 => SUBSTR (SQLERRM,
                                                                     1,
                                                                     2000
                                                                    )
                           );
Line: 8670

	update_rdb_status(g_temp_tc_list,
	                  'PENDING',
	                  'SKIPPED');
Line: 8674

        g_temp_tc_list.DELETE;
Line: 8677

             INSERT INTO hxc_rdb_process_details
                  ( timecard_id,
                    detail_id,
                    detail_ovn,
                    skipped_reason,
                    skip_level,
                    ret_user_id,
                    request_id,
                    process)
             VALUES ( l_skipped_tc_id(i),
                      l_skipped_bb_id (i),
                      l_skipped_bb_ovn(i),
                      l_skipped_desc(i),
                      'OTL_PROC',
                      FND_GLOBAL.user_ID,
                      FND_GLOBAL.conc_request_id,
                      g_params.p_process);
Line: 8795

	update_rdb_status(g_temp_tc_list,
	                  'PENDING',
	                  'PROCESSING');
Line: 8798

	update_rdb_status(g_temp_tc_list,
	                  'SKIPPED',
	                  'PROCESSING_PARTIAL');
Line: 8801

	g_temp_tc_list.DELETE;
Line: 8804

             INSERT INTO hxc_rdb_process_details
                  ( timecard_id,
                    detail_id,
                    detail_ovn,
                    skipped_reason,
                    skip_level,
                    ret_user_id,
                    request_id,
                    process)
             VALUES ( l_skipped_tc_id(i),
                      l_skipped_bb_id (i),
                      l_skipped_bb_ovn(i),
                      l_skipped_desc(i),
                      'OTL_PROC',
                      FND_GLOBAL.user_ID,
                      FND_GLOBAL.conc_request_id,
                      g_params.p_process);
Line: 8856

                         (p_mode                        => 'I'       -- Insert
                                                              ,
                          p_transaction_process_id      => g_retrieval_process_id,
                          p_status                      => 'ERRORS',
                          p_description                 => SUBSTR (SQLERRM,
                                                                   1,
                                                                   2000
                                                                  )
                         );
Line: 8885

  PROCEDURE delete_retrieval_ranges (p_transaction_id IN hxc_transactions.transaction_id%TYPE)
  IS
  PRAGMA AUTONOMOUS_TRANSACTION;
Line: 8890

       DELETE FROM HXC_RETRIEVAL_RANGE_RESOURCES
       WHERE RETRIEVAL_RANGE_ID IN
           ( SELECT RETRIEVAL_RANGE_ID
             FROM HXC_RETRIEVAL_RANGES
             WHERE CONC_REQUEST_ID = g_conc_request_id
	     AND   TRANSACTION_ID = p_transaction_id);
Line: 8897

       DELETE FROM HXC_RETRIEVAL_RANGES
       WHERE  CONC_REQUEST_ID = g_conc_request_id
       AND    TRANSACTION_ID = p_transaction_id;
Line: 8902

  END delete_retrieval_ranges;
Line: 8923

   PROCEDURE update_transaction_status (
      p_process                 hxc_retrieval_processes.NAME%TYPE,
      p_status                  hxc_transactions.status%TYPE,
      p_exception_description   hxc_transactions.exception_description%TYPE,
      p_rollback                BOOLEAN DEFAULT FALSE
   )
   IS
-- going to call the chk_retrieval_process procedure - do not need mapping id
      l_process_id            hxc_retrieval_processes.retrieval_process_id%TYPE;
Line: 9018

         l_proc := g_package || 'update_transaction_status';
Line: 9019

         hr_utility.TRACE ('In Update Transaction Status');
Line: 9048

                DELETE FROM hxc_bee_pref_adj_lines
                   WHERE detail_bb_id = t_tx_detail_bb_id(i)
                     AND batch_source = DECODE(g_params.p_process,
                                              'BEE Retrieval Process', 'OTM',
                                              'Apply Schedule Rules' , 'Time Store')
                     AND t_tx_detail_status(i) = 'ERRORS'                         ;
Line: 9064

         audit_transaction (p_mode                        => 'U'     -- update
                                                                ,
                            p_transaction_process_id      => l_process_id,
                            p_status                      => p_status,
                            p_description                 => p_exception_description,
                            p_rollback                    => p_rollback
                           );
Line: 9086

         INSERT INTO hxc_transactions
                     (transaction_id, transaction_process_id,
                      transaction_date, TYPE, status,
                      exception_description
                     )
              VALUES (l_tx_id, l_process_id,
                      SYSDATE, 'RETRIEVAL_STATUS_UPDATE', p_status,
                      p_exception_description
                     );
Line: 9096

         UPDATE hxc_transactions
            SET status = p_status,
                exception_description = p_exception_description
          WHERE transaction_id = hxc_generic_retrieval_pkg.g_transaction_id;
Line: 9128

                  INSERT INTO hxc_transaction_details
                              (transaction_detail_id,
                               time_building_block_id,
                               time_building_block_ovn,
                               transaction_id,
                               status,
                               exception_description
                              )
                       VALUES (hxc_generic_retrieval_pkg.t_tx_time_transaction_id
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_time_bb_id
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_time_bb_ovn
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.g_transaction_id,
                               hxc_generic_retrieval_pkg.t_tx_time_status
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_time_exception
                                                                    (tx_detail)
                              );
Line: 9170

                  INSERT INTO hxc_transaction_details
                              (transaction_detail_id,
                               time_building_block_id,
                               time_building_block_ovn,
                               transaction_id,
                               status,
                               exception_description
                              )
                       VALUES (hxc_generic_retrieval_pkg.t_tx_day_transaction_id
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_day_bb_id
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_day_bb_ovn
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.g_transaction_id,
                               hxc_generic_retrieval_pkg.t_tx_day_status
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_day_exception
                                                                    (tx_detail)
                              );
Line: 9212

                  INSERT INTO hxc_transaction_details
                              (transaction_detail_id,
                               time_building_block_id,
                               time_building_block_ovn,
                               transaction_id,
                               status,
                               exception_description
                              )
                       VALUES (hxc_generic_retrieval_pkg.t_tx_detail_transaction_id
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_detail_bb_id
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_detail_bb_ovn
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.g_transaction_id,
                               hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_detail),
                               hxc_generic_retrieval_pkg.t_tx_detail_exception
                                                                    (tx_detail)
                              );
Line: 9244

                        g_tc_ovn_array.DELETE(g_timecards_array(hxc_generic_retrieval_pkg.t_tx_detail_bb_id(i)));
Line: 9245

                        g_timecards_array.DELETE(hxc_generic_retrieval_pkg.t_tx_detail_bb_id(i));
Line: 9265

                        DELETE FROM hxc_pa_latest_details
                              WHERE time_building_block_id = hxc_generic_retrieval_pkg.t_tx_detail_bb_id(tx_error)
                               AND hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_error) = 'SUCCESS'
                         RETURNING
                                 resource_id,
                                 time_building_block_id,
                                 approval_status,
                                 start_time,
                                 stop_time,
                                 org_id,
                                 business_group_id,
                                 timecard_id,
                                 attribute1,
                                 attribute2,
                                 attribute3,
                                 measure,
                                 object_version_number
                         BULK
                          COLLECT INTO
                                t_l_resource_id,
                                t_l_time_building_block_id,
                                t_l_approval_status,
                                t_l_start_time,
                                t_l_stop_time,
                                t_l_org_id,
                                t_l_business_group_id,
                                t_l_timecard_id,
                                t_l_attribute1,
                                t_l_attribute2,
                                t_l_attribute3,
                                t_l_measure,
                                t_l_object_version_number;
Line: 9309

                            UPDATE /*+ INDEX(ret HXC_RET_PA_LATEST_DETAILS_FK1) */
                                   hxc_ret_pa_latest_details ret
                               SET old_attribute1 = attribute1,
                                   old_attribute2 = attribute2,
                                   old_attribute3 = attribute3,
                                   old_measure    = measure,
                                   old_ovn        = object_version_number,
                                   old_pei_id     = pei_id,
                                   old_exp_group  = exp_group,
                                   pei_id         = NULL,
                                   exp_group      = NULL,
                                   measure        = t_l_measure(i),
                                   attribute1     = t_l_attribute1(i),
                                   attribute2     = t_l_attribute2(i),
                                   attribute3     = t_l_attribute3(i),
                                   object_version_number = t_l_object_version_number(i),
                                   business_group_id = t_l_business_group_id(i),
                                   org_id     = t_l_org_id(i),
                                   approval_status = t_l_approval_status(i),
                                   old_request_id = request_id,
                                   request_id = FND_GLOBAL.conc_request_id
                             WHERE time_building_block_id = t_l_time_building_block_id(i)
                           RETURNING time_building_block_id
                                BULK COLLECT INTO l_old_tbb;
Line: 9389

                          INSERT INTO hxc_ret_pa_latest_details
                                     (resource_id,
                                      time_building_block_id,
                                      approval_status,
                                      start_time,
                                      stop_time,
                                      org_id,
                                      business_group_id,
                                      timecard_id,
                                      attribute1,
                                      attribute2,
                                      attribute3,
                                      measure,
                                      object_version_number,
                                      request_id
                                      )
                             VALUES     (
                                          l_resource_id(i),
                                          l_time_building_block_id(i),
                                          l_approval_status(i),
                                          l_start_time(i),
                                          l_stop_time(i),
                                          l_org_id(i),
                                          l_business_group_id(i),
                                          l_timecard_id(i),
                                          l_attribute1(i),
                                          l_attribute2(i),
                                          l_attribute3(i),
                                          l_measure(i),
                                          l_object_version_number(i),
                                          FND_GLOBAL.conc_request_id);
Line: 9427

                   g_temp_tc_list.DELETE;
Line: 9440

                        DELETE FROM hxc_rdb_process_details
                              WHERE detail_id   = hxc_generic_retrieval_pkg.t_tx_detail_bb_id(tx_error)
                               AND hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_error) = 'SUCCESS'
                                AND request_id  = FND_GLOBAL.CONC_REQUEST_ID
                                AND ret_user_id = FND_global.user_id
                                AND process     = g_params.p_process
                          RETURNING timecard_id
                               BULK
                            COLLECT INTO l_success_tc ;
Line: 9458

                        UPDATE hxc_rdb_process_details
                           SET skip_level = 'REC_PROC',
                               skipped_reason = SUBSTR(hxc_generic_retrieval_pkg.t_tx_detail_exception
                                                                    (tx_error),1,149)
                              WHERE detail_id = hxc_generic_retrieval_pkg.t_tx_detail_bb_id(tx_error)
                               AND hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_error) = 'ERRORS'
                               AND request_id = FND_GLOBAL.CONC_REQUEST_ID
                               AND ret_user_id = FND_global.user_id
                               AND process = g_params.p_process
                         RETURNING timecard_id
                              BULK
                           COLLECT INTO l_error_tc ;
Line: 9482

                   update_rdb_status((l_success_tc MULTISET EXCEPT l_error_tc),
                                      'PROCESSING',
                                      'PROCESSED');
Line: 9487

                   update_rdb_status((l_success_tc MULTISET EXCEPT l_error_tc),
                                      'PROCESSING_PARTIAL',
                                      'PROCESSED_PARTIALLY');
Line: 9492

                   update_rdb_status((l_error_tc MULTISET EXCEPT l_success_tc),
                                     'PROCESSING',
                                     'ERRORED');
Line: 9497

                   update_rdb_status((l_error_tc MULTISET EXCEPT l_success_tc),
                                     'PROCESSING_PARTIAL',
                                     'ERRORED');
Line: 9502

                   update_rdb_status((l_error_tc MULTISET INTERSECT l_success_tc),
                                     'PROCESSING',
                                     'PROCESSED_PARTIALLY');
Line: 9507

                   update_rdb_status((l_error_tc MULTISET INTERSECT l_success_tc),
                                     'PROCESSING_PARTIAL',
                                     'PROCESSED_PARTIALLY');
Line: 9518

                   g_temp_tc_list.DELETE;
Line: 9524

                        DELETE FROM hxc_pay_latest_details
                              WHERE time_building_block_id = hxc_generic_retrieval_pkg.t_tx_detail_bb_id(tx_error)
                               AND hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_error) = 'SUCCESS'
                         RETURNING
                                 resource_id,
                                 time_building_block_id,
                                 approval_status,
                                 start_time,
                                 stop_time,
                                 org_id,
                                 business_group_id,
                                 timecard_id,
                                 attribute1,
                                 attribute2,
                                 attribute3,
                                 measure,
                                 object_version_number,
                                 application_set_id
                           BULK COLLECT INTO
                                t_l_resource_id,
                                t_l_time_building_block_id,
                                t_l_approval_status,
                                t_l_start_time,
                                t_l_stop_time,
                                t_l_org_id,
                                t_l_business_group_id,
                                t_l_timecard_id,
                                t_l_attribute1,
                                t_l_attribute2,
                                t_l_attribute3,
                                t_l_measure,
                                t_l_object_version_number,
                                t_l_application_set_id;
Line: 9568

                            UPDATE hxc_ret_pay_latest_details
                               SET old_attribute1 = attribute1,
                                   old_attribute2 = attribute2,
                                   old_attribute3 = attribute3,
                                   old_measure    = measure,
                                   old_ovn        = object_version_number,
                                   measure = t_l_measure(i),
                                   attribute1 = t_l_attribute1(i),
                                   attribute2 = t_l_attribute2(i),
                                   attribute3 = t_l_attribute3(i),
                                   object_version_number = t_l_object_version_number(i),
                                   business_group_id = t_l_business_group_id(i),
                                   org_id     = t_l_org_id(i),
                                   approval_status = t_l_approval_status(i),
                                   old_request_id  = request_id,
                                   old_batch_id    = batch_id,
                                   request_id      = FND_global.conc_request_id,
                                   application_set_id = t_l_application_set_id(i)
                             WHERE time_building_block_id = t_l_time_building_block_id(i)
                               AND old_batch_id IS NULL
                         RETURNING time_building_block_id
                              BULK COLLECT INTO l_old_tbb;
Line: 9594

                             UPDATE hxc_ret_pay_latest_details
                                SET old_attribute1 = attribute1,
                                    old_attribute2 = attribute2,
                                    old_attribute3 = attribute3,
                                    old_measure    = measure,
                                    old_ovn        = object_version_number,
                                    measure = t_l_measure(i),
                                    attribute1 = t_l_attribute1(i),
                                    attribute2 = t_l_attribute2(i),
                                    attribute3 = t_l_attribute3(i),
                                    object_version_number = t_l_object_version_number(i),
                                    business_group_id = t_l_business_group_id(i),
                                    org_id     = t_l_org_id(i),
                                    approval_status = t_l_approval_status(i),
                                    old_request_id  = request_id,
                                    old_batch_id    = batch_id,
                                    request_id      = FND_global.conc_request_id,
                                    application_set_id = t_l_application_set_id(i)
                              WHERE time_building_block_id = t_l_time_building_block_id(i)
                          RETURNING time_building_block_id
                               BULK COLLECT INTO l_old_tbb;
Line: 9677

                          INSERT INTO hxc_ret_pay_latest_details
                               (resource_id,
                                time_building_block_id,
                                approval_status,
                                start_time,
                                stop_time,
                                org_id,
                                business_group_id,
                                timecard_id,
                                attribute1,
                                attribute2,
                                attribute3,
                                measure,
                                object_version_number,
                                request_id,
                                application_set_id
                                )
                            VALUES     (
                                    l_resource_id(i),
                                    l_time_building_block_id(i),
                                    l_approval_status(i),
                                    l_start_time(i),
                                    l_stop_time(i),
                                    l_org_id(i),
                                    l_business_group_id(i),
                                    l_timecard_id(i),
                                    l_attribute1(i),
                                    l_attribute2(i),
                                    l_attribute3(i),
                                    l_measure(i),
                                    l_object_version_number(i),
                                    FND_GLOBAL.conc_request_id,
                                    l_application_set_id(i));
Line: 9715

                          INSERT INTO hxc_ret_pay_details
                               (resource_id,
                                time_building_block_id,
                                approval_status,
                                start_time,
                                stop_time,
                                org_id,
                                business_group_id,
                                timecard_id,
                                attribute1,
                                attribute2,
                                attribute3,
                                measure,
                                object_version_number,
                                request_id
                                )
                            VALUES     (
                                    t_l_resource_id(i),
                                    t_l_time_building_block_id(i),
                                    t_l_approval_status(i),
                                    t_l_start_time(i),
                                    t_l_stop_time(i),
                                    t_l_org_id(i),
                                    t_l_business_group_id(i),
                                    t_l_timecard_id(i),
                                    t_l_attribute1(i),
                                    t_l_attribute2(i),
                                    t_l_attribute3(i),
                                    t_l_measure(i),
                                    t_l_object_version_number(i),
                                    FND_GLOBAL.conc_request_id);
Line: 9773

                            UPDATE hxc_ret_pay_latest_details
                               SET old_pbl_id = pbl_id,
                                   pbl_id = l_rec_id(i),
                                   batch_id = l_batch_id(i)
                             WHERE time_building_block_id = l_rec_bb_id(i)
                               AND object_version_number  = l_rec_ovn(i);
Line: 9782

                            UPDATE hxc_ret_pay_details
                               SET pbl_id = l_rec_id(i),
                                   batch_id = l_batch_id(i)
                             WHERE time_building_block_id = l_rec_bb_id(i)
                               AND object_version_number  = l_rec_ovn(i);
Line: 9791

                               INSERT INTO hxc_pay_trans_code_all
                                   ( transaction_code,
                                     batch_id,
                                     request_id)
                                  VALUES ( g_params.p_transaction_code,
                                           l_batch_id(i),
                                           FND_GLOBAL.conc_request_id);
Line: 9833

                            UPDATE hxc_ret_pay_latest_details
                               SET retro_pbl_id = l_rec_id(i),
                                   retro_batch_id = l_batch_id(i)
                             WHERE time_building_block_id = l_rec_bb_id(i)
                               AND old_ovn  = l_rec_ovn(i);
Line: 9841

                            UPDATE hxc_ret_pay_details
                               SET retro_pbl_id = l_rec_id(i),
                                   retro_batch_id = l_batch_id(i),
                                   old_ovn = l_rec_ovn(i)
                             WHERE time_building_block_id = l_rec_bb_id(i)
                               AND request_id = FND_GLOBAL.conc_request_id ;
Line: 9851

                                INSERT INTO hxc_pay_trans_code_all
                                    ( transaction_code,
                                      batch_id,
                                      request_id)
                                 VALUES ( g_params.p_transaction_code,
                                          l_batch_id(i),
                                          FND_GLOBAL.conc_request_id);
Line: 9877

                        DELETE FROM hxc_rdb_process_details
                              WHERE detail_id   = hxc_generic_retrieval_pkg.t_tx_detail_bb_id(tx_error)
                               AND hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_error) = 'SUCCESS'
                                AND request_id  = FND_GLOBAL.CONC_REQUEST_ID
                                AND ret_user_id = FND_global.user_id
                                AND process     = g_params.p_process
                          RETURNING timecard_id
                               BULK
                            COLLECT INTO l_success_tc ;
Line: 9899

                         UPDATE hxc_ld_rollback_timecards_all
                            SET request_id = FND_Global.conc_request_id
                          WHERE timecard_id = l_success_tc(rlbk)
                           RETURNING timecard_id BULK COLLECT INTO l_rlbk_elig_tc1;
Line: 9907

                         INSERT INTO hxc_ld_rollback_timecards_all
                           (timecard_id, request_id)
                          VALUES (l_rlbk_elig_tc2(rlbk),FND_GLOBAL.conc_request_id);
Line: 9916

                        UPDATE hxc_rdb_process_details
                           SET skip_level     = 'REC_PROC',
                               skipped_reason = SUBSTR(hxc_generic_retrieval_pkg.t_tx_detail_exception
                                                                    (tx_error),1,149)
                              WHERE detail_id   = hxc_generic_retrieval_pkg.t_tx_detail_bb_id(tx_error)
                               AND hxc_generic_retrieval_pkg.t_tx_detail_status
                                                                    (tx_error) = 'ERRORS'
                               AND request_id   = FND_GLOBAL.CONC_REQUEST_ID
                               AND ret_user_id  = FND_global.user_id
                               AND process      = g_params.p_process
                         RETURNING timecard_id
                              BULK
                           COLLECT INTO l_error_tc ;
Line: 9934

                     update_rdb_status((l_success_tc MULTISET EXCEPT l_error_tc),
                                      'PROCESSING',
                                      'PROCESSED');
Line: 9939

                     update_rdb_status((l_success_tc MULTISET EXCEPT l_error_tc),
                                      'PROCESSING_PARTIAL',
                                      'PROCESSED_PARTIALLY');
Line: 9944

                     update_rdb_status((l_error_tc MULTISET EXCEPT l_success_tc),
                                      'PROCESSING',
                                      'ERRORED');
Line: 9948

                     update_rdb_status((l_error_tc MULTISET EXCEPT l_success_tc),
                                      'PROCESSING_PARTIAL',
                                      'ERRORED');
Line: 9953

                     update_rdb_status((l_error_tc MULTISET INTERSECT l_success_tc),
                                      'PROCESSING',
                                      'PROCESSED_PARTIALLY');
Line: 9958

                     update_rdb_status((l_error_tc MULTISET INTERSECT l_success_tc),
                                      'PROCESSING_PARTIAL',
                                      'PROCESSED_PARTIALLY');
Line: 10003

                  INSERT INTO hxc_transaction_details
                              (transaction_detail_id,
                               time_building_block_id,
                               time_building_block_ovn,
                               transaction_id,
                               status,
                               exception_description
                              )
                       VALUES (hxc_generic_retrieval_pkg.t_tx_error_transaction_id
                                                                     (tx_error),
                               hxc_generic_retrieval_pkg.t_tx_error_bb_id
                                                                     (tx_error),
                               hxc_generic_retrieval_pkg.t_tx_error_bb_ovn
                                                                     (tx_error),
                               hxc_generic_retrieval_pkg.g_transaction_id,
                               hxc_generic_retrieval_pkg.t_tx_error_status
                                                                     (tx_error),
                               hxc_generic_retrieval_pkg.t_tx_error_exception
                                                                     (tx_error)
                              );
Line: 10025

               hxc_generic_retrieval_pkg.t_tx_error_transaction_id.DELETE;
Line: 10026

               hxc_generic_retrieval_pkg.t_tx_error_bb_id.DELETE;
Line: 10027

               hxc_generic_retrieval_pkg.t_tx_error_bb_ovn.DELETE;
Line: 10028

               hxc_generic_retrieval_pkg.t_tx_error_status.DELETE;
Line: 10029

               hxc_generic_retrieval_pkg.t_tx_error_exception.DELETE;
Line: 10047

            UPDATE hxc_retrieval_ranges
               SET transaction_id = -1
             WHERE retrieval_process_id = l_process_id AND transaction_id = -1;
Line: 10091

            hxc_timecard_summary_pkg.update_transferred_to(i,
                                                           g_tc_ovn_array(i),
                                                           l_process_id );
Line: 10100

      g_tc_ovn_array.DELETE;
Line: 10104

	-- DO NOT DELETE FOR 'IN PROGRESS' TRANSACTIONS
        THEN
               IF g_debug
               THEN
                       hr_utility.TRACE ('g_conc_request_id is ' || g_conc_request_id);
Line: 10111

               delete_retrieval_ranges (hxc_generic_retrieval_pkg.g_transaction_id);
Line: 10225

         hr_utility.TRACE ('Leaving Update Transaction Status');
Line: 10227

   END update_transaction_status;
Line: 10248

PROCEDURE update_rdb_status ( p_tc_list  NUMBERTABLE,
                              p_from_status   VARCHAR2,
                              p_to_status     VARCHAR2)
IS

    PRAGMA AUTONOMOUS_TRANSACTION;
Line: 10278

        UPDATE hxc_rdb_process_timecards
           SET stage = p_to_status
         WHERE timecard_id = l_tctab(i)
           AND stage = p_from_status
           AND process = g_params.p_process;
Line: 10286

END update_rdb_status;
Line: 10293

PROCEDURE update_rdb_status ( p_tc_list  NUMTABLE,
                              p_from_status   VARCHAR2,
                              p_to_status     VARCHAR2)
IS

    PRAGMA AUTONOMOUS_TRANSACTION;
Line: 10309

        UPDATE hxc_rdb_process_timecards
           SET stage = p_to_status
         WHERE timecard_id = p_tc_list(i)
           AND stage = p_from_status
           AND process = g_params.p_process;
Line: 10317

END update_rdb_status;