DBA Data[Home] [Help]

APPS.PSP_ARCHIVE_RETRIEVE dependencies on PSP_ARCH_RET_REQUESTS

Line 1862: INTO psp_arch_ret_requests (request_id

1858: -- Archival Process dates --> start_date and end_date
1859: -- Distribution Dates within a batch --> batch_name_rec.Min_dist_date and batch_name_rec.Max_dist_date
1860:
1861: INSERT
1862: INTO psp_arch_ret_requests (request_id
1863: , start_date
1864: , end_date
1865: , arch_ret_flag
1866: , batch_name

Line 2075: UPDATE psp_arch_ret_requests

2071: WHERE rowid = r_batch_rec.t_row_id (k);
2072:
2073: -- Updating the count of archived data for the batch in the control table
2074:
2075: UPDATE psp_arch_ret_requests
2076: SET archived_batch_size = Nvl(archived_batch_size,0)+g_bulk_row_count
2077: WHERE request_id = l_request_id
2078: AND batch_name LIKE batch_name_rec.Batch_name(j);
2079:

Line 2081: hr_utility.Trace('update psp_arch_ret_requests count: '||SQL%rowcount);

2077: WHERE request_id = l_request_id
2078: AND batch_name LIKE batch_name_rec.Batch_name(j);
2079:
2080: IF g_debug_enabled THEN
2081: hr_utility.Trace('update psp_arch_ret_requests count: '||SQL%rowcount);
2082: END IF;
2083:
2084: COMMIT; -- Committing partial batch
2085:

Line 2098: UPDATE psp_arch_ret_requests

2094: END IF;
2095:
2096: --Once the complete data is archived the corresponding BATCH is updated as A.
2097:
2098: UPDATE psp_arch_ret_requests
2099: SET arch_ret_flag = 'A'
2100: WHERE request_id = l_request_id
2101: AND batch_name = batch_name_rec.Batch_name(j);
2102:

Line 2104: hr_utility.Trace('Updated psp_arch_ret_requests setting to A: '||SQL%rowcount);

2100: WHERE request_id = l_request_id
2101: AND batch_name = batch_name_rec.Batch_name(j);
2102:
2103: IF g_debug_enabled THEN
2104: hr_utility.Trace('Updated psp_arch_ret_requests setting to A: '||SQL%rowcount);
2105: END IF;
2106:
2107: -- Below query helps to validate whether the complete data is archived or not
2108:

Line 2111: FROM psp_arch_ret_requests

2107: -- Below query helps to validate whether the complete data is archived or not
2108:
2109: SELECT archived_batch_size,batch_size
2110: INTO l_archived_batch_size,l_original_size
2111: FROM psp_arch_ret_requests
2112: WHERE request_id = l_request_id
2113: AND batch_name = batch_name_rec.Batch_name(j);
2114:
2115:

Line 2167: FROM psp_arch_ret_requests

2163: SELECT batch_name
2164: , batch_size
2165: , min_dist_date
2166: , max_dist_date
2167: FROM psp_arch_ret_requests
2168: WHERE request_id = p_arch_request_id;
2169:
2170: -- Cursor selects the archived records from the interface table for the batches which were picked based on the arch request id.
2171:

Line 2222: FROM psp_distribution_int_arch pdia,psp_arch_ret_requests parr

2218: ,suspense_org_account_id
2219: ,currency_code
2220: ,suspense_auto_glccid
2221: ,suspense_auto_exp_type
2222: FROM psp_distribution_int_arch pdia,psp_arch_ret_requests parr
2223: WHERE parr.request_id = p_arch_request_id
2224: AND parr.batch_name = p_batch_name
2225: AND pdia.request_id = parr.request_id
2226: AND pdia.batch_name = parr.batch_name;

Line 2231: FROM psp_arch_ret_requests

2227:
2228: CURSOR batch_counts_cur(p_batch_name VARCHAR2) IS
2229: SELECT archived_batch_size
2230: , batch_size
2231: FROM psp_arch_ret_requests
2232: WHERE request_id = p_arch_request_id
2233: AND batch_name = p_batch_name;
2234:
2235: l_valid_batch_exists BOOLEAN := false;

Line 2340: FROM psp_arch_ret_requests

2336: -- Selects archival code information which is same for all the batchs for the corresponding arch request id
2337:
2338: SELECT start_date, end_date, archival_code
2339: INTO l_begin_date,l_end_date,l_archival_code
2340: FROM psp_arch_ret_requests
2341: WHERE request_id = p_arch_request_id
2342: AND rownum < 2;
2343:
2344: fnd_file.Put_line(fnd_file.log,'Retrieve Distribution Interface for Archival Code: '||l_archival_code|| ' for Start Date: '||l_begin_date||' and End Date: '||l_end_date);

Line 2348: UPDATE psp_arch_ret_requests

2344: fnd_file.Put_line(fnd_file.log,'Retrieve Distribution Interface for Archival Code: '||l_archival_code|| ' for Start Date: '||l_begin_date||' and End Date: '||l_end_date);
2345:
2346: -- Initially the arch_ret_flag will be A, before the retrieval process begins the flag will change to R for all the batches of the request
2347:
2348: UPDATE psp_arch_ret_requests
2349: SET arch_ret_flag = 'R' -- Locking the batches to be retrieved
2350: WHERE request_id = p_arch_request_id;
2351:
2352: IF g_debug_enabled THEN

Line 2353: hr_utility.Trace('updated batches in psp_arch_ret_requests set to R - count: '||SQL%rowcount);

2349: SET arch_ret_flag = 'R' -- Locking the batches to be retrieved
2350: WHERE request_id = p_arch_request_id;
2351:
2352: IF g_debug_enabled THEN
2353: hr_utility.Trace('updated batches in psp_arch_ret_requests set to R - count: '||SQL%rowcount);
2354: END IF;
2355:
2356: COMMIT;
2357:

Line 2584: UPDATE psp_arch_ret_requests

2580: hr_utility.Trace('g_bulk_row_count delete: '||g_bulk_row_count);
2581: END IF;
2582:
2583: -- Reduces the size of the batch from control table when the records were moved partially from archive to main table.
2584: UPDATE psp_arch_ret_requests
2585: SET archived_batch_size = archived_batch_size - g_bulk_row_count
2586: WHERE request_id = p_arch_request_id
2587: AND batch_name = batch_name_rec.Batch_name(i);
2588:

Line 2591: hr_utility.Trace('Updated psp_arch_ret_requests: '||SQL%rowcount);

2587: AND batch_name = batch_name_rec.Batch_name(i);
2588:
2589: IF g_debug_enabled THEN
2590: hr_utility.Trace('Batch Name: '||batch_name_rec.Batch_name(i)|| ' request_id: '||p_arch_request_id);
2591: hr_utility.Trace('Updated psp_arch_ret_requests: '||SQL%rowcount);
2592: END IF;
2593:
2594: COMMIT; -- Committing partial batch Jbz
2595: END LOOP;

Line 2622: DELETE FROM psp_arch_ret_requests

2618: fnd_file.Put_line(fnd_file.log,'---------------------------------------------------------------------------------------------------------------------');
2619:
2620: -- Once all the batches were completed the records corresponding to the arch request id will be deleted from the control table.
2621:
2622: DELETE FROM psp_arch_ret_requests
2623: WHERE request_id = p_arch_request_id;
2624:
2625: IF g_debug_enabled THEN
2626: hr_utility.Trace('delete count: '||SQL%rowcount);