DBA Data[Home] [Help]

APPS.FUN_TRX_PVT dependencies on FUN_TRX_HEADERS

Line 2243: FROM fun_trx_headers hdrs

2239: AND original_batch_id IS NULL
2240: AND reversed_batch_id IS NULL
2241: AND status = 'COMPLETE'
2242: AND NOT EXISTS (SELECT 'Transaction already reversed'
2243: FROM fun_trx_headers hdrs
2244: WHERE hdrs.batch_id = p_batch_id
2245: AND (hdrs.original_trx_id IS NOT NULL
2246: OR
2247: hdrs.reversed_trx_id IS NOT NULL));*/

Line 2256: FROM fun_trx_headers hdrs

2252: AND reversed_batch_id IS NULL
2253: AND(
2254: (status in ('COMPLETE')
2255: AND NOT EXISTS (SELECT 'Transaction already reversed'
2256: FROM fun_trx_headers hdrs
2257: WHERE hdrs.batch_id = p_batch_id
2258: AND (hdrs.original_trx_id IS NOT NULL
2259: OR
2260: hdrs.reversed_trx_id IS NOT NULL))

Line 2264: FROM fun_trx_headers hdrs

2260: hdrs.reversed_trx_id IS NOT NULL))
2261: ) OR
2262: (
2263: NOT EXISTS (SELECT 'Transaction not reversed'
2264: FROM fun_trx_headers hdrs
2265: WHERE hdrs.batch_id = p_batch_id
2266: AND (hdrs.original_trx_id IS NOT NULL
2267: OR hdrs.reversed_trx_id IS NOT NULL)
2268: AND hdrs.status in ('COMPLETE', 'APPROVED'))

Line 2415: INSERT INTO fun_trx_headers(TRX_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,
2417: INITIATOR_ID,
2418: RECIPIENT_ID,
2419: TO_LE_ID,

Line 2461: SELECT fun_trx_headers_s.nextval,

2457: CREATION_DATE,
2458: LAST_UPDATED_BY,
2459: LAST_UPDATE_DATE,
2460: LAST_UPDATE_LOGIN)
2461: SELECT fun_trx_headers_s.nextval,
2462: TRX_NUMBER, -- Problem: what to use
2463: INITIATOR_ID,
2464: RECIPIENT_ID,
2465: TO_LE_ID,

Line 2511: FROM fun_trx_headers

2507: sysdate,
2508: fnd_global.user_id,
2509: sysdate,
2510: fnd_global.user_id
2511: FROM fun_trx_headers
2512: WHERE batch_id = p_batch_id
2513: AND STATUS in ('COMPLETE', 'APPROVED'); -- Bug: 6625360. AND STATUS = 'COMPLETE';
2514:
2515: -- Update reversed_trx_id with fun_trx_headers

Line 2515: -- Update reversed_trx_id with fun_trx_headers

2511: FROM fun_trx_headers
2512: WHERE batch_id = p_batch_id
2513: AND STATUS in ('COMPLETE', 'APPROVED'); -- Bug: 6625360. AND STATUS = 'COMPLETE';
2514:
2515: -- Update reversed_trx_id with fun_trx_headers
2516: UPDATE fun_trx_headers hdrs1
2517: SET (reversed_trx_id) = (SELECT trx_id
2518: FROM fun_trx_headers hdrs2
2519: WHERE hdrs2.original_trx_id = hdrs1.trx_id)

Line 2516: UPDATE fun_trx_headers hdrs1

2512: WHERE batch_id = p_batch_id
2513: AND STATUS in ('COMPLETE', 'APPROVED'); -- Bug: 6625360. AND STATUS = 'COMPLETE';
2514:
2515: -- Update reversed_trx_id with fun_trx_headers
2516: UPDATE fun_trx_headers hdrs1
2517: SET (reversed_trx_id) = (SELECT trx_id
2518: FROM fun_trx_headers hdrs2
2519: WHERE hdrs2.original_trx_id = hdrs1.trx_id)
2520: WHERE hdrs1.batch_id = p_batch_id;

Line 2518: FROM fun_trx_headers hdrs2

2514:
2515: -- Update reversed_trx_id with fun_trx_headers
2516: UPDATE fun_trx_headers hdrs1
2517: SET (reversed_trx_id) = (SELECT trx_id
2518: FROM fun_trx_headers hdrs2
2519: WHERE hdrs2.original_trx_id = hdrs1.trx_id)
2520: WHERE hdrs1.batch_id = p_batch_id;
2521:
2522: -- Insert into init_dist

Line 2585: FROM fun_trx_headers headers, fun_trx_lines lines

2581: sysdate,
2582: fnd_global.user_id,
2583: sysdate,
2584: fnd_global.user_id
2585: FROM fun_trx_headers headers, fun_trx_lines lines
2586: WHERE headers.batch_id = l_reversed_batch_id
2587: AND headers.original_trx_id = lines.trx_id;
2588:
2589: -- Insert into dist_lines

Line 2660: FROM fun_trx_headers reversed_hdrs,

2656: fnd_global.user_id,
2657: sysdate,
2658: fnd_global.user_id,
2659: reversed_hdrs.trx_id
2660: FROM fun_trx_headers reversed_hdrs,
2661: fun_trx_lines reversed_lines,
2662: --fun_batch_dists reversed_b_dists,
2663: fun_trx_lines orig_lines,
2664: fun_dist_lines orig_dists

Line 2718: FROM fun_trx_headers headers

2714: -- Insert into transaction
2715: -- Insert into init_dist
2716: -- Insert into dist_lines
2717: SELECT initiator_id INTO l_initiator_id
2718: FROM fun_trx_headers headers
2719: WHERE headers.trx_id = p_trx_tbl_id(1)
2720: AND headers.reversed_trx_id IS NULL
2721: AND headers.original_trx_id IS NULL
2722: AND headers.status in ('COMPLETE', 'APPROVED');--Bug: 6625360. AND headers.status = 'COMPLETE';

Line 2774: FROM fun_trx_headers h

2770: FOR i IN 1..p_trx_tbl_id.COUNT LOOP
2771:
2772: SELECT nvl(h.INIT_AMOUNT_CR,0), nvl(h.INIT_AMOUNT_DR,0)
2773: INTO l_batch_cr, l_batch_dr
2774: FROM fun_trx_headers h
2775: WHERE h.trx_id=p_trx_tbl_id(i);
2776:
2777: l_total_batch_cr:=l_total_batch_cr + l_batch_cr ;
2778: l_total_batch_dr:=l_total_batch_dr + l_batch_dr ;

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 2882: INSERT INTO fun_trx_headers(TRX_ID,

2878: -- Loop the trx_id table and insert reversed txns
2879: FOR i IN 1..p_trx_tbl_id.COUNT LOOP
2880:
2881: -- Insert into transaction with status sent
2882: INSERT INTO fun_trx_headers(TRX_ID,
2883: TRX_NUMBER,
2884: INITIATOR_ID,
2885: RECIPIENT_ID,
2886: TO_LE_ID,

Line 2928: SELECT fun_trx_headers_s.nextval,

2924: CREATION_DATE,
2925: LAST_UPDATED_BY,
2926: LAST_UPDATE_DATE,
2927: LAST_UPDATE_LOGIN)
2928: SELECT fun_trx_headers_s.nextval,
2929: TRX_NUMBER, -- Problem: what to use
2930: INITIATOR_ID,
2931: RECIPIENT_ID,
2932: TO_LE_ID,

Line 2978: FROM fun_trx_headers

2974: sysdate,
2975: fnd_global.user_id,
2976: sysdate,
2977: fnd_global.user_id
2978: FROM fun_trx_headers
2979: WHERE trx_id = p_trx_tbl_id(i)
2980: AND STATUS in ('COMPLETE', 'APPROVED'); --Bug: 6625360. AND STATUS = 'COMPLETE';
2981: -- Update reversed_trx_id with fun_trx_headers
2982: UPDATE fun_trx_headers hdrs1

Line 2981: -- Update reversed_trx_id with fun_trx_headers

2977: fnd_global.user_id
2978: FROM fun_trx_headers
2979: WHERE trx_id = p_trx_tbl_id(i)
2980: AND STATUS in ('COMPLETE', 'APPROVED'); --Bug: 6625360. AND STATUS = 'COMPLETE';
2981: -- Update reversed_trx_id with fun_trx_headers
2982: UPDATE fun_trx_headers hdrs1
2983: SET (reversed_trx_id) = (SELECT trx_id
2984: FROM fun_trx_headers hdrs2
2985: WHERE hdrs2.original_trx_id = hdrs1.trx_id)

Line 2982: UPDATE fun_trx_headers hdrs1

2978: FROM fun_trx_headers
2979: WHERE trx_id = p_trx_tbl_id(i)
2980: AND STATUS in ('COMPLETE', 'APPROVED'); --Bug: 6625360. AND STATUS = 'COMPLETE';
2981: -- Update reversed_trx_id with fun_trx_headers
2982: UPDATE fun_trx_headers hdrs1
2983: SET (reversed_trx_id) = (SELECT trx_id
2984: FROM fun_trx_headers hdrs2
2985: WHERE hdrs2.original_trx_id = hdrs1.trx_id)
2986: WHERE hdrs1.trx_id = p_trx_tbl_id(i);

Line 2984: FROM fun_trx_headers hdrs2

2980: AND STATUS in ('COMPLETE', 'APPROVED'); --Bug: 6625360. AND STATUS = 'COMPLETE';
2981: -- Update reversed_trx_id with fun_trx_headers
2982: UPDATE fun_trx_headers hdrs1
2983: SET (reversed_trx_id) = (SELECT trx_id
2984: FROM fun_trx_headers hdrs2
2985: WHERE hdrs2.original_trx_id = hdrs1.trx_id)
2986: WHERE hdrs1.trx_id = p_trx_tbl_id(i);
2987:
2988: END LOOP;

Line 2993: from fun_trx_headers

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: ),
2996: RUNNING_TOTAL_DR=(Select SUM(nvl(INIT_AMOUNT_DR,0))
2997: from fun_trx_headers

Line 2997: from fun_trx_headers

2993: from fun_trx_headers
2994: where batch_id=l_reversed_batch_id
2995: ),
2996: RUNNING_TOTAL_DR=(Select SUM(nvl(INIT_AMOUNT_DR,0))
2997: from fun_trx_headers
2998: where batch_id=l_reversed_batch_id
2999: )
3000: where batch_id=l_reversed_batch_id;
3001:

Line 3036: FROM fun_trx_headers headers, fun_trx_lines lines

3032: sysdate,
3033: fnd_global.user_id,
3034: sysdate,
3035: fnd_global.user_id
3036: FROM fun_trx_headers headers, fun_trx_lines lines
3037: WHERE headers.batch_id = l_reversed_batch_id
3038: AND headers.original_trx_id = lines.trx_id;
3039:
3040: -- Insert into dist_lines

Line 3111: FROM fun_trx_headers reversed_hdrs,

3107: fnd_global.user_id,
3108: sysdate,
3109: fnd_global.user_id,
3110: reversed_hdrs.trx_id
3111: FROM fun_trx_headers reversed_hdrs,
3112: fun_trx_lines reversed_lines,
3113: --fun_batch_dists reversed_b_dists,
3114: fun_trx_lines orig_lines,
3115: fun_dist_lines orig_dists

Line 3148: FROM fun_trx_headers

3144: l_batch_id NUMBER;
3145: l_count NUMBER;
3146: CURSOR trx_status_csr IS
3147: SELECT status
3148: FROM fun_trx_headers
3149: WHERE trx_id = p_trx_id FOR UPDATE;
3150: BEGIN
3151: -- Standard Start of API savepoint
3152: SAVEPOINT Update_Trx_Status;

Line 3201: UPDATE fun_trx_headers

3197: (l_status = 'XFER_AR' AND p_update_status_to = 'COMPLETE') OR
3198: (l_status = 'XFER_INI_GL' AND p_update_status_to = 'COMPLETE') OR
3199: (l_status = 'XFER_RECI_GL' AND p_update_status_to = 'COMPLETE')
3200: THEN
3201: UPDATE fun_trx_headers
3202: SET status = p_update_status_to
3203: WHERE trx_id = p_trx_id;
3204:
3205: SELECT batch_id

Line 3207: FROM fun_trx_headers

3203: WHERE trx_id = p_trx_id;
3204:
3205: SELECT batch_id
3206: INTO l_batch_id
3207: FROM fun_trx_headers
3208: WHERE trx_id = p_trx_id;
3209:
3210: IF (p_update_status_to = 'ERROR')
3211: THEN

Line 3218: FROM fun_trx_headers

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
3219: WHERE batch_id = l_batch_id
3220: AND status <> 'ERROR');
3221:
3222: ELSIF (p_update_status_to IN ('COMPLETE', 'REJECTED'))

Line 3230: FROM fun_trx_headers

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
3231: WHERE batch_id = l_batch_id
3232: AND status NOT IN ('COMPLETE','REJECTED'));
3233:
3234:

Line 3957: FROM fun_trx_headers

3953: initiator_instance_flag,
3954: recipient_instance_flag,
3955: NULL,
3956: trx_number
3957: FROM fun_trx_headers
3958: WHERE batch_id = p_batch_id;
3959:
3960: l_init_dist_tbl INIT_DIST_TBL_TYPE;
3961: CURSOR l_init_dist_cursor IS SELECT batch_dist_id,

Line 3984: FROM fun_trx_headers hdrs,

3980: dists.amount_cr,
3981: dists.amount_dr,
3982: dists.ccid,
3983: hdrs.trx_number
3984: FROM fun_trx_headers hdrs,
3985: fun_trx_lines lines,
3986: fun_dist_lines dists
3987: WHERE hdrs.batch_id = p_batch_id
3988: AND hdrs.trx_id = lines.trx_id

Line 4400: FROM fun_trx_headers

4396: WHERE batch_id = p_batch_id;
4397:
4398: SELECT recipient_id, to_le_id
4399: INTO l_recipient_id, l_to_le_id
4400: FROM fun_trx_headers
4401: WHERE trx_id = p_trx_id;
4402:
4403: -- Retrieve Operating unit
4404: l_from_ou_id := Fun_Tca_Pkg.Get_OU_Id(l_initiator_id, l_trx_date);