DBA Data[Home] [Help]

APPS.PA_RETENTION_UTIL dependencies on PA_PROJECT_CUSTOMERS

Line 239: from pa_project_customers pc

235: source and destination project */
236:
237: cursor pc_cur (l_fr_project_id number, l_to_project_id number) IS
238: select pc.customer_id, pc.retention_level_code
239: from pa_project_customers pc
240: where pc.project_id = l_fr_project_id
241: and pc.customer_id in (select customer_id from pa_project_customers
242: where project_id = l_to_project_id);
243:

Line 241: and pc.customer_id in (select customer_id from pa_project_customers

237: cursor pc_cur (l_fr_project_id number, l_to_project_id number) IS
238: select pc.customer_id, pc.retention_level_code
239: from pa_project_customers pc
240: where pc.project_id = l_fr_project_id
241: and pc.customer_id in (select customer_id from pa_project_customers
242: where project_id = l_to_project_id);
243:
244: /* This cursor selects those customer records of destination project which do not have
245: the same customers in the source project

Line 250: from pa_project_customers pc

246: These records will not have their retention_level_code updated by the previous cursor */
247:
248: cursor no_cust_cur (l_fr_project_id number, l_to_project_id number) IS
249: select pc.customer_id, pc.retention_level_code
250: from pa_project_customers pc
251: where pc.project_id = l_to_project_id
252: and pc.customer_id not in (select customer_id from pa_project_customers
253: where project_id = l_fr_project_id);
254:

Line 252: and pc.customer_id not in (select customer_id from pa_project_customers

248: cursor no_cust_cur (l_fr_project_id number, l_to_project_id number) IS
249: select pc.customer_id, pc.retention_level_code
250: from pa_project_customers pc
251: where pc.project_id = l_to_project_id
252: and pc.customer_id not in (select customer_id from pa_project_customers
253: where project_id = l_fr_project_id);
254:
255: l_to_project_id NUMBER;
256: l_primary_cust_id NUMBER;

Line 295: update pa_project_customers

291:
292: --dbms_output.put_line ('in OA');
293: --l_to_project_id := p_fr_project_id;
294:
295: update pa_project_customers
296: set retention_level_code = (select retention_level_code
297: from pa_project_customers
298: where project_id = p_fr_project_id
299: and customer_id = p_fr_customer_id)

Line 297: from pa_project_customers

293: --l_to_project_id := p_fr_project_id;
294:
295: update pa_project_customers
296: set retention_level_code = (select retention_level_code
297: from pa_project_customers
298: where project_id = p_fr_project_id
299: and customer_id = p_fr_customer_id)
300: where project_id = p_to_project_id
301: and customer_id = p_to_customer_id;

Line 348: update pa_project_customers

344: x_msg_data => l_msg_data );
345:
346: for pc_rec in pc_cur (p_fr_project_id, p_to_project_id) loop
347:
348: update pa_project_customers
349: set retention_level_code = pc_rec.retention_level_code
350: where project_id = p_to_project_id
351: and customer_id = pc_rec.customer_id;
352:

Line 374: from pa_project_customers pc

370: /* If there are customers in the destination project not existing in source project
371: the source project's primary customer setup is copied to the destination project */
372:
373: SELECT count(*) into l_not_update
374: from pa_project_customers pc
375: where pc.project_id = p_to_project_id
376: and pc.customer_id not in (select customer_id from pa_project_customers
377: where project_id = p_fr_project_id);
378:

Line 376: and pc.customer_id not in (select customer_id from pa_project_customers

372:
373: SELECT count(*) into l_not_update
374: from pa_project_customers pc
375: where pc.project_id = p_to_project_id
376: and pc.customer_id not in (select customer_id from pa_project_customers
377: where project_id = p_fr_project_id);
378:
379: if l_not_update <> 0 then
380:

Line 390: from pa_project_customers pc

386: if (nvl(l_primary_cust_id,0) <> 0) then
387:
388: select pc.retention_level_code
389: into l_retention_level_code
390: from pa_project_customers pc
391: where pc.project_id = p_fr_project_id
392: and pc.customer_id = l_primary_cust_id;
393:
394: for pc_no_rec in no_cust_cur (p_fr_project_id, p_to_project_id ) loop

Line 396: update pa_project_customers

392: and pc.customer_id = l_primary_cust_id;
393:
394: for pc_no_rec in no_cust_cur (p_fr_project_id, p_to_project_id ) loop
395:
396: update pa_project_customers
397: set retention_level_code = l_retention_level_code
398: where project_id = p_to_project_id
399: and customer_id = pc_no_rec.customer_id;
400:

Line 1354: | and customer id from pa_project_customers table |

1350:
1351: /*----------------------------------------------------------------------------------------+
1352: | Procedure : get_rec_version_num |
1353: | Purpose : This procedure returns the record version number of the given project |
1354: | and customer id from pa_project_customers table |
1355: | Parameters : |
1356: | ================================================================================== |
1357: | Name Mode Description |
1358: | ================================================================================== |

Line 1374: FROM pa_project_customers

1370: BEGIN
1371:
1372: SELECT record_version_number
1373: INTO x_version_num
1374: FROM pa_project_customers
1375: WHERE project_id = p_project_id
1376: AND customer_id = p_customer_id;
1377:
1378: EXCEPTION

Line 1387: | number of the given project and customer id in pa_project_customers |

1383:
1384: /*----------------------------------------------------------------------------------------+
1385: | Procedure : check_rec_version_num |
1386: | Purpose : This procedure checks the record version number with the record version|
1387: | number of the given project and customer id in pa_project_customers |
1388: | table |
1389: | Parameters : |
1390: | ================================================================================== |
1391: | Name Mode Description |

Line 1413: FROM pa_project_customers

1409: BEGIN
1410:
1411: SELECT record_version_number
1412: INTO l_version_num
1413: FROM pa_project_customers
1414: WHERE project_id = p_project_id
1415: AND customer_id = p_customer_id;
1416:
1417: EXCEPTION

Line 1437: | and customer id in pa_project_customers table |

1433:
1434: /*----------------------------------------------------------------------------------------+
1435: | Procedure : set_rec_version_num |
1436: | Purpose : This procedure sets the record version number of the given project |
1437: | and customer id in pa_project_customers table |
1438: | Parameters : |
1439: | ================================================================================== |
1440: | Name Mode Description |
1441: | ================================================================================== |

Line 1478: update pa_project_customers

1474: p_version_num => p_version_num);
1475:
1476: IF vers_valid = 'T' THEN
1477:
1478: update pa_project_customers
1479: set record_version_number = p_version_num + 1
1480: where project_id = p_project_id
1481: and customer_id = p_customer_id
1482: and record_version_number = p_version_num;

Line 2663: UPDATE PA_PROJECT_CUSTOMERS

2659: DELETE FROM PA_PROJ_RETN_BILL_RULES
2660: WHERE Project_ID = P_Project_ID
2661: AND Customer_ID = P_Customer_ID;
2662:
2663: UPDATE PA_PROJECT_CUSTOMERS
2664: SET Retention_Level_Code = ''
2665: WHERE Project_ID = P_Project_ID
2666: AND Customer_ID = P_Customer_ID;
2667: