DBA Data[Home] [Help]

APPS.FUN_TRX_PVT dependencies on FUN_TRX_BATCHES

Line 161: FROM fun_trx_batches

157: ) IS
158: l_count NUMBER;
159: CURSOR batch_num_csr IS
160: SELECT COUNT(*)
161: FROM fun_trx_batches
162: WHERE initiator_id = p_initiator_id
163: AND batch_number = p_batch_number;
164: BEGIN
165: Debug('IS_BATCH_NUM_UNIQUE(+)');

Line 2237: FROM fun_trx_batches batches

2233: -- and the batch is not a reversed batch itself
2234: -- Verify the status of the batch
2235: --Bug: 6625360.
2236: /* SELECT count(initiator_id) INTO l_initiator_id
2237: FROM fun_trx_batches batches
2238: WHERE batch_id = p_batch_id
2239: AND original_batch_id IS NULL
2240: AND reversed_batch_id IS NULL
2241: AND status = 'COMPLETE'

Line 2249: FROM fun_trx_batches batches

2245: AND (hdrs.original_trx_id IS NOT NULL
2246: OR
2247: hdrs.reversed_trx_id IS NOT NULL));*/
2248: SELECT count(initiator_id) INTO l_initiator_id
2249: FROM fun_trx_batches batches
2250: WHERE batch_id = p_batch_id
2251: AND original_batch_id IS NULL
2252: AND reversed_batch_id IS NULL
2253: AND(

Line 2300: 'FUN_TRX_BATCHES',

2296: l_control_date_tbl(0) := l_control_date_rec;
2297: FUN_SEQ.GET_SEQUENCE_NUMBER('INTERCOMPANY_BATCH_SOURCE',
2298: 'LOCAL',
2299: 435,
2300: 'FUN_TRX_BATCHES',
2301: 'CREATION',
2302: null,
2303: l_control_date_tbl,
2304: 'N',

Line 2316: SELECT fun_trx_batches_s.nextval INTO l_reversed_batch_id FROM dual;

2312: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2313: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2314: END IF;
2315: -- Get the next sequence for fun_batch_id
2316: SELECT fun_trx_batches_s.nextval INTO l_reversed_batch_id FROM dual;
2317: -- Update original batch with reversed_batch_id
2318: UPDATE fun_trx_batches
2319: SET reversed_batch_id = l_reversed_batch_id
2320: WHERE batch_id = p_batch_id;

Line 2318: UPDATE fun_trx_batches

2314: END IF;
2315: -- Get the next sequence for fun_batch_id
2316: SELECT fun_trx_batches_s.nextval INTO l_reversed_batch_id FROM dual;
2317: -- Update original batch with reversed_batch_id
2318: UPDATE fun_trx_batches
2319: SET reversed_batch_id = l_reversed_batch_id
2320: WHERE batch_id = p_batch_id;
2321: -- Insert into batch with orig_batch_id
2322: INSERT INTO fun_trx_batches(BATCH_ID,

Line 2322: INSERT INTO fun_trx_batches(BATCH_ID,

2318: UPDATE fun_trx_batches
2319: SET reversed_batch_id = l_reversed_batch_id
2320: WHERE batch_id = p_batch_id;
2321: -- Insert into batch with orig_batch_id
2322: INSERT INTO fun_trx_batches(BATCH_ID,
2323: BATCH_NUMBER,
2324: INITIATOR_ID,
2325: FROM_LE_ID,
2326: FROM_LEDGER_ID,

Line 2412: FROM fun_trx_batches

2408: fnd_global.user_id,
2409: sysdate,
2410: fnd_global.user_id,
2411: auto_proration_flag
2412: FROM fun_trx_batches
2413: WHERE batch_id = p_batch_id;
2414: -- Insert into transaction with status sent, ignore the rejected ones
2415: INSERT INTO fun_trx_headers(TRX_ID,
2416: TRX_NUMBER,

Line 2751: 'FUN_TRX_BATCHES',

2747: l_control_date_tbl(0) := l_control_date_rec;
2748: FUN_SEQ.GET_SEQUENCE_NUMBER('INTERCOMPANY_BATCH_SOURCE',
2749: 'LOCAL',
2750: 435,
2751: 'FUN_TRX_BATCHES',
2752: 'CREATION',
2753: null,
2754: l_control_date_tbl,
2755: 'N',

Line 2767: SELECT fun_trx_batches_s.nextval INTO l_reversed_batch_id FROM dual;

2763: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2764: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2765: END IF;
2766: -- Get the next sequence for fun_batch_id
2767: SELECT fun_trx_batches_s.nextval INTO l_reversed_batch_id FROM dual;
2768:
2769: -- Loop the trx_id table to get sum of debits and credits for txns to be reversed
2770: FOR i IN 1..p_trx_tbl_id.COUNT LOOP
2771:

Line 2784: INSERT INTO fun_trx_batches(BATCH_ID,

2780: END LOOP;
2781: -- end of loop to get sum of debits and credits for txns to be reversed
2782:
2783: -- Insert into batch with orig_batch_id
2784: INSERT INTO fun_trx_batches(BATCH_ID,
2785: BATCH_NUMBER,
2786: INITIATOR_ID,
2787: FROM_LE_ID,
2788: FROM_LEDGER_ID,

Line 2874: FROM fun_trx_batches batches, fun_trx_headers headers

2870: fnd_global.user_id,
2871: sysdate,
2872: fnd_global.user_id,
2873: batches.auto_proration_flag
2874: FROM fun_trx_batches batches, fun_trx_headers headers
2875: WHERE batches.batch_id = headers.batch_id
2876: AND headers.trx_id = p_trx_tbl_id(1);
2877:
2878: -- Loop the trx_id table and insert reversed txns

Line 2991: UPDATE fun_trx_batches

2987:
2988: END LOOP;
2989: --End loop; which is looping trx_id table and inserting reversed txns
2990:
2991: UPDATE fun_trx_batches
2992: SET RUNNING_TOTAL_CR=(Select SUM(nvl(INIT_AMOUNT_CR,0))
2993: from fun_trx_headers
2994: where batch_id=l_reversed_batch_id
2995: ),

Line 3214: UPDATE fun_trx_batches

3210: IF (p_update_status_to = 'ERROR')
3211: THEN
3212: -- Update batch to ERROR if all
3213: -- transactions are at status ERROR
3214: UPDATE fun_trx_batches
3215: SET status = 'ERROR'
3216: WHERE batch_id = l_batch_id
3217: AND NOT EXISTS (SELECT 'X'
3218: FROM fun_trx_headers

Line 3226: UPDATE fun_trx_batches

3222: ELSIF (p_update_status_to IN ('COMPLETE', 'REJECTED'))
3223: THEN
3224: -- Update batch to COMPLETE if all
3225: -- transactions are at status COMPLETE or REJECTTED
3226: UPDATE fun_trx_batches
3227: SET status = 'COMPLETE'
3228: WHERE batch_id = l_batch_id
3229: AND NOT EXISTS (SELECT 'X'
3230: FROM fun_trx_headers

Line 3932: FROM fun_trx_batches

3928: batch_date,
3929: reject_allow_flag,
3930: from_recurring_batch_id,
3931: auto_proration_flag
3932: FROM fun_trx_batches
3933: WHERE batch_id = p_batch_id;
3934: l_trx_tbl TRX_TBL_TYPE;
3935: CURSOR l_trx_cursor IS SELECT trx_id,
3936: initiator_id,

Line 4395: FROM fun_trx_batches

4391:
4392: -- Retrieve initiator, transaction type
4393: SELECT initiator_id, trx_type_id, batch_date, from_ledger_id
4394: INTO l_initiator_id, l_trx_type_id, l_trx_date, l_from_ledger_id
4395: FROM fun_trx_batches
4396: WHERE batch_id = p_batch_id;
4397:
4398: SELECT recipient_id, to_le_id
4399: INTO l_recipient_id, l_to_le_id