DBA Data[Home] [Help]

APPS.PSA_UTILS dependencies on AP_INVOICE_DISTRIBUTIONS

Line 289: SELECT * FROM AP_INVOICE_DISTRIBUTIONS_ALL WHERE INVOICE_ID = '||p_entity_rec.source_id_int_1;

285:
286: IF (p_retcode = g_SUCCESS) THEN
287: BEGIN
288: l_string := 'CREATE TABLE PSA_BKP_AP_INV_DIST_'||l_backup_string||' AS
289: SELECT * FROM AP_INVOICE_DISTRIBUTIONS_ALL WHERE INVOICE_ID = '||p_entity_rec.source_id_int_1;
290: EXECUTE IMMEDIATE l_string;
291: EXCEPTION
292: WHEN OTHERS THEN
293: log(l_path_name, 'EXCEPTION: '|| SQLERRM(sqlcode));

Line 303: FROM AP_INVOICE_DISTRIBUTIONS_ALL WHERE INVOICE_ID = '||p_entity_rec.source_id_int_1||

299: BEGIN
300: l_string := 'CREATE TABLE PSA_BKP_GMS_DISTS_'||l_backup_string||' AS
301: SELECT * FROM GMS_AWARD_DISTRIBUTIONS WHERE INVOICE_DISTRIBUTION_ID IN (
302: SELECT INVOICE_DISTRIBUTION_ID
303: FROM AP_INVOICE_DISTRIBUTIONS_ALL WHERE INVOICE_ID = '||p_entity_rec.source_id_int_1||
304: ')';
305: EXECUTE IMMEDIATE l_string;
306: EXCEPTION
307: WHEN OTHERS THEN

Line 1185: UPDATE ap_invoice_distributions_all aid

1181: IF (p_retcode = g_SUCCESS) THEN
1182: FOR l_counter IN 1..l_events_tab.COUNT LOOP
1183: IF (l_events_tab(l_counter).budgetary_flag = 'N') THEN
1184: debug_other_string(g_state_level,l_path_name, 'Updating period_name for accounting events' );
1185: UPDATE ap_invoice_distributions_all aid
1186: SET period_name = (SELECT DISTINCT gps.period_name
1187: FROM gl_period_statuses gps
1188: WHERE gps.application_id = 200
1189: AND gps.set_of_books_id = l_events_tab(l_counter).ledger_id

Line 1204: debug_other_string(g_state_level,l_path_name, 'Updating ap_invoice_distributions_all for BC flags(1)' );

1200: AND hold_lookup_code = 'CANT FUNDS CHECK'
1201: AND release_lookup_code IS NULL;
1202: debug_other_string(g_state_level,l_path_name, 'Deleted '||SQL%ROWCOUNT||' rows.' );
1203:
1204: debug_other_string(g_state_level,l_path_name, 'Updating ap_invoice_distributions_all for BC flags(1)' );
1205: UPDATE ap_invoice_distributions_all
1206: SET encumbered_flag = 'N',
1207: match_status_flag = 'N',
1208: bc_event_id = NULL,

Line 1205: UPDATE ap_invoice_distributions_all

1201: AND release_lookup_code IS NULL;
1202: debug_other_string(g_state_level,l_path_name, 'Deleted '||SQL%ROWCOUNT||' rows.' );
1203:
1204: debug_other_string(g_state_level,l_path_name, 'Updating ap_invoice_distributions_all for BC flags(1)' );
1205: UPDATE ap_invoice_distributions_all
1206: SET encumbered_flag = 'N',
1207: match_status_flag = 'N',
1208: bc_event_id = NULL,
1209: posted_flag = 'N'

Line 1220: from ap_invoice_distributions_all

1216:
1217: update gms_award_distributions
1218: set fc_status = 'N'
1219: where invoice_distribution_id in (select invoice_distribution_id
1220: from ap_invoice_distributions_all
1221: where invoice_id = p_invoice_id
1222: and award_id is not null)
1223: and fc_status ='A';
1224:

Line 1234: from ap_invoice_distributions_all

1230: SET bc_event_id = null,
1231: accounting_event_id = decode(p_mode , 'A' , NULL,accounting_event_id)
1232: WHERE sad.invoice_id = p_invoice_id
1233: AND sad.invoice_distribution_id in (select invoice_distribution_id
1234: from ap_invoice_distributions_all
1235: where invoice_id = p_invoice_id);
1236:
1237: debug_other_string(g_state_level,l_path_name, 'Updated '||SQL%ROWCOUNT||' rows.' );
1238:

Line 1239: debug_other_string(g_state_level,l_path_name, 'Updating ap_invoice_distributions_all for Actual events' );

1235: where invoice_id = p_invoice_id);
1236:
1237: debug_other_string(g_state_level,l_path_name, 'Updated '||SQL%ROWCOUNT||' rows.' );
1238:
1239: debug_other_string(g_state_level,l_path_name, 'Updating ap_invoice_distributions_all for Actual events' );
1240: UPDATE ap_invoice_distributions_all
1241: SET accounting_event_id = decode(p_mode , 'A' , NULL, accounting_event_id)
1242: WHERE invoice_id = p_invoice_id;
1243: debug_other_string(g_state_level,l_path_name, 'Updated '||SQL%ROWCOUNT||' rows.' );

Line 1240: UPDATE ap_invoice_distributions_all

1236:
1237: debug_other_string(g_state_level,l_path_name, 'Updated '||SQL%ROWCOUNT||' rows.' );
1238:
1239: debug_other_string(g_state_level,l_path_name, 'Updating ap_invoice_distributions_all for Actual events' );
1240: UPDATE ap_invoice_distributions_all
1241: SET accounting_event_id = decode(p_mode , 'A' , NULL, accounting_event_id)
1242: WHERE invoice_id = p_invoice_id;
1243: debug_other_string(g_state_level,l_path_name, 'Updated '||SQL%ROWCOUNT||' rows.' );
1244: End if;

Line 1258: FROM ap_invoice_distributions

1254: UPDATE ap_prepay_app_dists d
1255: SET d.bc_event_id = NULL,
1256: d.accounting_event_id = decode(p_mode , 'A' , NULL,d.accounting_event_id)
1257: WHERE d.invoice_distribution_id IN (SELECT invoice_distribution_id
1258: FROM ap_invoice_distributions
1259: WHERE invoice_id = p_invoice_id);
1260:
1261: debug_other_string(g_state_level,l_path_name, 'Updated '||SQL%ROWCOUNT||' rows.' );
1262:

Line 1269: UPDATE ap_invoice_distributions_all aid

1265: IF (p_retcode = g_SUCCESS and p_mode = 'A') THEN
1266: FOR l_counter IN 1..l_events_tab.COUNT LOOP
1267: IF (l_events_tab(l_counter).budgetary_flag = 'N') THEN
1268: debug_other_string(g_state_level,l_path_name, 'Resetting flags on AID for accounting events' );
1269: UPDATE ap_invoice_distributions_all aid
1270: SET accrual_posted_flag = 'N',
1271: cash_posted_flag = 'N',
1272: posted_flag = 'N',
1273: accounting_date = l_events_tab(l_counter).gl_date