DBA Data[Home] [Help]

APPS.AMW_FINSTMT_CERT_BES_PKG dependencies on AMW_OPINION_MV

Line 243: AMW_OPINION_MV aov,

239:
240: l_stmt := 'select count(1) from (
241: Select distinct fin.PROCESS_ID, fin.ORGANIZATION_ID
242: FROM
243: AMW_OPINION_MV aov,
244: amw_fin_cert_scope fin,
245: AMW_FIN_PROC_CERT_RELAN rel
246: WHERE
247: rel.FIN_STMT_CERT_ID = ' || P_CERTIFICATION_ID || '

Line 317: AMW_OPINION_MV aov,

313:
314: l_stmt := 'SELECT COUNT(1) FROM
315: (Select distinct fin.PROCESS_ID, fin.ORGANIZATION_ID
316: FROM
317: AMW_OPINION_MV aov,
318: amw_fin_cert_scope fin
319: WHERE aov.OPINION_TYPE_CODE = ''EVALUATION''
320: and aov.object_name = ''AMW_ORG_PROCESS''
321: and aov.opinion_component_code = ''OVERALL''

Line 378: AMW_OPINION_MV aov,

374:
375: l_stmt := 'select count(1) from (
376: select distinct fin.ORGANIZATION_ID
377: FROM
378: AMW_OPINION_MV aov,
379: amw_fin_cert_scope fin
380: WHERE
381: aov.AUTHORED_DATE in (select max(aov2.authored_date)
382: from AMW_OPINIONS aov2

Line 444: AMW_OPINION_MV aov,

440:
441: l_stmt := 'select count(1) from (
442: select distinct fin.ORGANIZATION_ID
443: FROM
444: AMW_OPINION_MV aov,
445: amw_fin_cert_scope fin
446: WHERE aov.OPINION_TYPE_CODE = ''EVALUATION''
447: and aov.object_name = ''AMW_ORGANIZATION''
448: and aov.opinion_component_code = ''OVERALL''

Line 560: AMW_OPINION_MV aov,

556: l_stmt1 := ' AND FIN.STATEMENT_GROUP_ID = :2 AND FIN.FINANCIAL_STATEMENT_ID = :3 AND FIN.FINANCIAL_ITEM_ID = :4)';
557: l_stmt2 := ' AND FIN.NATURAL_ACCOUNT_ID = :2)';
558:
559: l_stmt := 'select count(1) from ( select distinct fin.organization_id FROM
560: AMW_OPINION_MV aov,
561: AMW_FIN_CERT_SCOPE fin
562: WHERE
563: aov.AUTHORED_DATE in (select max(aov2.authored_date)
564: from AMW_OPINIONS aov2

Line 626: AMW_OPINION_MV aov,

622:
623: l_stmt := 'select count(1) from (
624: Select distinct fin.process_id, fin.ORGANIZATION_ID
625: FROM
626: AMW_OPINION_MV aov,
627: amw_fin_cert_scope fin
628: WHERE
629: aov.AUTHORED_DATE in (select max(aov2.authored_date)
630: from AMW_OPINIONS aov2

Line 901: AMW_OPINION_MV aov,

897: /****replace with the following query that uses opinon_log_id in amw_fin_item_acc_ctrl table directly
898: l_stmt := 'select count(1) from(
899: select distinct fin.control_id, fin.organization_id
900: FROM
901: AMW_OPINION_MV aov,
902: amw_fin_item_acc_ctrl fin
903: WHERE
904: aov.AUTHORED_DATE in (select max(aov2.authored_date)
905: from AMW_OPINIONS aov2

Line 1004: AMW_OPINION_MV aov,

1000: /*****replace with the following query ,which uses opinion_log_id directly in amw_fin_item_acc_ctrl table
1001: l_stmt := 'select count(1) from(
1002: select distinct fin.control_id, fin.organization_id
1003: FROM
1004: AMW_OPINION_MV aov,
1005: amw_fin_item_acc_ctrl fin
1006: WHERE aov.OPINION_TYPE_CODE = ''EVALUATION''
1007: AND aov.object_name = ''AMW_ORG_CONTROL''
1008: and aov.opinion_component_code = ''OVERALL''

Line 1203: AMW_OPINION_MV aov,

1199:
1200: l_stmt := 'select count(1) from (
1201: Select distinct fin.process_ID, fin.ORGANIZATION_ID
1202: FROM
1203: AMW_OPINION_MV aov,
1204: amw_fin_cert_scope fin,
1205: amw_fin_proc_cert_relan rel
1206: WHERE
1207: rel.FIN_STMT_CERT_ID = ' || P_CERTIFICATION_ID || '

Line 1280: FROM AMW_OPINION_MV aov,

1276: FROM AMW_FIN_PROCESS_EVAL_SUM proc
1277: WHERE proc.fin_certification_id = p_certification_id
1278: AND proc.organization_id = NVL(fnd_profile.value('AMW_GLOBAL_ORG_ID'), -999)
1279: AND not exists (SELECT 'Y'
1280: FROM AMW_OPINION_MV aov,
1281: AMW_FIN_PROC_CERT_RELAN rel
1282: WHERE aov.object_name = 'AMW_ORG_PROCESS'
1283: AND aov.opinion_type_code = 'CERTIFICATION'
1284: AND aov.opinion_component_code = 'OVERALL'

Line 1308: FROM AMW_OPINION_MV aov,

1304: FROM AMW_FIN_PROCESS_EVAL_SUM proc
1305: WHERE proc.fin_certification_id = p_certification_id
1306: AND proc.organization_id <> NVL(fnd_profile.value('AMW_GLOBAL_ORG_ID'),-999)
1307: AND not exists (SELECT 'Y'
1308: FROM AMW_OPINION_MV aov,
1309: AMW_FIN_PROC_CERT_RELAN rel
1310: WHERE aov.object_name = 'AMW_ORG_PROCESS'
1311: AND aov.opinion_type_code = 'CERTIFICATION'
1312: AND aov.opinion_component_code = 'OVERALL'

Line 1333: AMW_OPINION_MV aov,

1329: ---- global_proc_with_issue
1330: SELECT count(1) INTO x_global_proc_with_issue
1331: FROM (SELECT DISTINCT proc.organization_id, proc.process_id
1332: FROM AMW_FIN_PROCESS_EVAL_SUM proc,
1333: AMW_OPINION_MV aov,
1334: AMW_FIN_PROC_CERT_RELAN rel
1335: WHERE proc.fin_certification_id = p_certification_id
1336: AND proc.organization_id = NVL(fnd_profile.value('AMW_GLOBAL_ORG_ID'), -999)
1337: AND aov.object_name = 'AMW_ORG_PROCESS'

Line 1363: AMW_OPINION_MV aov,

1359: ------local_proc_with_issue
1360: SELECT count(1) INTO x_local_proc_with_issue
1361: FROM (SELECT DISTINCT proc.organization_id, proc.process_id
1362: FROM AMW_FIN_PROCESS_EVAL_SUM proc,
1363: AMW_OPINION_MV aov,
1364: AMW_FIN_PROC_CERT_RELAN rel
1365: WHERE proc.fin_certification_id = p_certification_id
1366: AND proc.organization_id <> NVL(fnd_profile.value('AMW_GLOBAL_ORG_ID'), -999)
1367: AND aov.object_name = 'AMW_ORG_PROCESS'

Line 1394: AMW_OPINION_MV aov

1390: -------------global_proc_with_ineff_ctrl IS
1391: SELECT count(1) INTO x_global_proc_ineff_ctrl
1392: from (select distinct proc.organization_id, proc.process_id
1393: FROM AMW_FIN_PROCESS_EVAL_SUM proc,
1394: AMW_OPINION_MV aov
1395: WHERE proc.fin_certification_id = p_certification_id
1396: AND proc.organization_id = aov.pk3_value
1397: AND proc.process_id = aov.pk1_value
1398: --fix bug 5724066

Line 1423: AMW_OPINION_MV aov

1419: ------ local_proc_with_ineff_ctrl
1420: SELECT count(1) INTO x_local_proc_ineff_ctrl
1421: from (select distinct proc.organization_id, proc.process_id
1422: FROM AMW_FIN_PROCESS_EVAL_SUM proc,
1423: AMW_OPINION_MV aov
1424: WHERE proc.fin_certification_id = p_certification_id
1425: AND proc.organization_id = aov.pk3_value
1426: AND proc.process_id = aov.pk1_value
1427: --fix bug 5724066

Line 1451: FROM AMW_OPINION_MV aov,

1447: ----unmitigated_risks IS
1448: /*** remove due to ratio number mismatch
1449: SELECT count(1) INTO x_unmitigated_risks
1450: from (select distinct fin.organization_id, fin.process_id, fin.risk_id
1451: FROM AMW_OPINION_MV aov,
1452: AMW_FIN_ITEM_ACC_RISK fin
1453: WHERE
1454: fin.object_type = 'FINANCIAL STATEMENT'
1455: AND fin.FIN_CERTIFICATION_ID = p_certification_id

Line 1495: FROM AMW_OPINION_MV aov,

1491: ---------ineffective_controls
1492: /***************replace to use opinion_log_id in amw_fin_item_acc_ctrl table
1493: SELECT count(1) INTO x_ineffective_controls
1494: from(select distinct fin.control_id, fin.organization_id
1495: FROM AMW_OPINION_MV aov,
1496: AMW_FIN_ITEM_ACC_CTRL fin
1497: WHERE fin.fin_certification_id = p_certification_id
1498: AND fin.object_type = 'FINANCIAL STATEMENT'
1499: AND aov.pk1_value = fin.control_id

Line 1545: FROM AMW_OPINION_MV aov

1541: FROM AMW_FIN_CERT_SCOPE fin
1542: WHERE fin.FIN_CERTIFICATION_ID = p_certification_id
1543: AND fin.organization_id is not null
1544: AND not exists ( SELECT 'Y'
1545: FROM AMW_OPINION_MV aov
1546: WHERE aov.object_name = 'AMW_ORG_PROCESS'
1547: AND aov.opinion_type_code = 'CERTIFICATION'
1548: AND aov.opinion_component_code = 'OVERALL'
1549: AND aov.pk3_value = fin.organization_id

Line 3369: dbms_mview.refresh('AMW_OPINION_MV', '?');

3365: BEGIN
3366:
3367: SAVEPOINT Master_Fin_Proc_Eval_Sum;
3368:
3369: dbms_mview.refresh('AMW_OPINION_MV', '?');
3370: dbms_mview.refresh('AMW_OPINION_LOG_MV', '?');
3371:
3372: l_start_date := p_start_date;
3373: IF(p_mode = 'NEW') THEN

Line 3769: FROM AMW_OPINION_MV aov

3765:
3766: -- org process certified
3767: CURSOR org_processes_certified(p_cert_id NUMBER,p_process_id NUMBER) IS
3768: SELECT count(distinct aov.pk3_value)
3769: FROM AMW_OPINION_MV aov
3770: WHERE aov.object_name = 'AMW_ORG_PROCESS'
3771: AND aov.opinion_type_code = 'CERTIFICATION'
3772: AND aov.opinion_component_code = 'OVERALL'
3773: AND aov.pk3_value <> NVL(fnd_profile.value('AMW_GLOBAL_ORG_ID'),-999)

Line 3802: FROM AMW_OPINION_MV aov

3798:
3799: CURSOR org_var_processes_certified(p_cert_id NUMBER,p_start_date DATE,p_end_date DATE,p_process_id NUMBER) IS
3800: select count(1) from
3801: (SELECT distinct aov.pk3_value,aov.pk1_value
3802: FROM AMW_OPINION_MV aov
3803: WHERE aov.object_name = 'AMW_ORG_PROCESS'
3804: AND aov.opinion_type_code = 'CERTIFICATION'
3805: AND aov.opinion_component_code = 'OVERALL'
3806: AND aov.pk2_value in (

Line 4017: FROM AMW_OPINION_MV aov

4013:
4014:
4015: CURSOR sub_processes_certified IS
4016: SELECT count(distinct aov.pk1_value)
4017: FROM AMW_OPINION_MV aov
4018: WHERE aov.object_name = 'AMW_ORG_PROCESS'
4019: AND aov.opinion_type_code = 'CERTIFICATION'
4020: AND aov.opinion_component_code = 'OVERALL'
4021: AND aov.pk3_value = p_organization_id

Line 4043: FROM AMW_OPINION_MV aov

4039:
4040:
4041: CURSOR certification_result IS
4042: SELECT aov.opinion_id
4043: FROM AMW_OPINION_MV aov
4044: WHERE aov.object_name = 'AMW_ORG_PROCESS'
4045: AND aov.opinion_type_code = 'CERTIFICATION'
4046: AND aov.opinion_component_code = 'OVERALL'
4047: AND aov.pk3_value = p_organization_id

Line 4072: FROM AMW_OPINION_MV aov

4068:
4069:
4070: CURSOR last_evaluation IS
4071: SELECT distinct aov.opinion_id
4072: FROM AMW_OPINION_MV aov
4073: WHERE aov.object_name = 'AMW_ORG_PROCESS'
4074: AND aov.opinion_type_code = 'EVALUATION'
4075: AND aov.opinion_component_code = 'OVERALL'
4076: AND aov.pk3_value = p_organization_id

Line 4097: AMW_OPINION_MV aov

4093: SELECT count(1)
4094: FROM
4095: AMW_RISK_ASSOCIATIONS ara,
4096: AMW_FIN_PROCESS_FLAT orgrel,
4097: AMW_OPINION_MV aov
4098: WHERE ara.object_type = 'PROCESS_ORG'
4099: AND ara.pk1 = p_organization_id
4100: AND orgrel.fin_certification_id = p_certification_id
4101: AND ara.pk1 = orgrel.organization_id

Line 4146: AMW_OPINION_MV aov,

4142: SELECT count(1)
4143: from (select distinct ara.pk1, ara.pk2, ara.risk_id
4144: FROM
4145: AMW_RISK_ASSOCIATIONS ara,
4146: AMW_OPINION_MV aov,
4147: AMW_FIN_PROCESS_FLAT orgrel
4148: WHERE ara.object_type = 'PROCESS_ORG'
4149: AND ara.pk1 = p_organization_id
4150: AND orgrel.fin_certification_id = p_certification_id

Line 4172: AMW_OPINION_MV aov

4168: SELECT count(distinct aca.control_id)
4169: FROM
4170: AMW_CONTROL_ASSOCIATIONS aca,
4171: AMW_FIN_PROCESS_FLAT orgrel,
4172: AMW_OPINION_MV aov
4173: WHERE
4174: aca.object_type = 'RISK_ORG'
4175: and aca.pk1 = p_organization_id
4176: and orgrel.fin_certification_id = p_certification_id

Line 4218: AMW_OPINION_MV aov

4214: SELECT count(distinct aca.control_id)
4215: FROM
4216: AMW_CONTROL_ASSOCIATIONS aca,
4217: AMW_FIN_PROCESS_FLAT orgrel,
4218: AMW_OPINION_MV aov
4219: WHERE
4220: aca.object_type = 'RISK_ORG'
4221: and aca.pk1 = p_organization_id
4222: and orgrel.fin_certification_id = p_certification_id

Line 5313: FROM AMW_OPINION_MV aov

5309: --need check opinion framework doc
5310: --in ap association table, if type = 'CTRL_FINCERT', pk1=certification_id, pk2=organization_id, pk3=process_id, pk4=control_id, pk5=opinion_id
5311: CURSOR last_evaluation(l_audit_procedure_id number, l_organization_id number, l_control_id number) IS
5312: SELECT distinct aov.opinion_id
5313: FROM AMW_OPINION_MV aov
5314: WHERE
5315: aov.object_name = 'AMW_ORG_AP_CONTROL'
5316: AND aov.opinion_type_code = 'EVALUATION'
5317: AND aov.opinion_component_code = 'OVERALL'

Line 5662: FROM AMW_OPINION_MV aov

5658: )
5659: IS
5660: CURSOR last_evaluation IS
5661: SELECT distinct aov.opinion_id
5662: FROM AMW_OPINION_MV aov
5663: WHERE aov.object_name = 'AMW_ORGANIZATION'
5664: AND aov.opinion_type_code = 'EVALUATION'
5665: AND aov.opinion_component_code = 'OVERALL'
5666: AND aov.pk1_value = p_organization_id

Line 5681: FROM AMW_OPINION_MV aov

5677: WHERE aov.opinion_id = l_opinion_id;
5678:
5679: CURSOR last_certification IS
5680: SELECT aov.opinion_id
5681: FROM AMW_OPINION_MV aov
5682: WHERE aov.object_name = 'AMW_ORGANIZATION'
5683: AND aov.opinion_type_code = 'CERTIFICATION'
5684: AND aov.opinion_component_code = 'OVERALL'
5685: AND aov.pk1_value = p_organization_id

Line 5715: AMW_OPINION_MV aov

5711:
5712: CURSOR proc_with_issue IS
5713: SELECT count(distinct proeval.process_id)
5714: FROM AMW_FIN_PROCESS_EVAL_SUM proeval,
5715: AMW_OPINION_MV aov
5716: WHERE proeval.fin_certification_id = p_certification_id
5717: AND proeval.organization_id = p_organization_id
5718: AND aov.object_name = 'AMW_ORG_PROCESS'
5719: AND aov.opinion_type_code = 'CERTIFICATION'

Line 5741: AMW_OPINION_MV aov

5737:
5738: CURSOR proc_without_issue IS
5739: SELECT count(distinct proeval.process_id)
5740: FROM AMW_FIN_PROCESS_EVAL_SUM proeval,
5741: AMW_OPINION_MV aov
5742: WHERE proeval.fin_certification_id = p_certification_id
5743: AND proeval.organization_id = p_organization_id
5744: AND aov.object_name = 'AMW_ORG_PROCESS'
5745: AND aov.opinion_type_code = 'CERTIFICATION'

Line 5767: AMW_OPINION_MV aov

5763:
5764: CURSOR proc_with_ineff_ctrl IS
5765: SELECT count(distinct proeval.process_id)
5766: FROM AMW_FIN_PROCESS_EVAL_SUM proeval,
5767: AMW_OPINION_MV aov
5768: WHERE proeval.fin_certification_id = p_certification_id
5769: AND proeval.organization_id = p_organization_id
5770: AND aov.object_name = 'AMW_ORG_PROCESS'
5771: AND aov.opinion_type_code = 'EVALUATION'

Line 5788: AMW_OPINION_MV aov

5784:
5785: CURSOR verified_processes IS
5786: SELECT count(distinct proeval.process_id)
5787: FROM AMW_FIN_PROCESS_EVAL_SUM proeval,
5788: AMW_OPINION_MV aov
5789: WHERE proeval.fin_certification_id = p_certification_id
5790: AND proeval.organization_id = p_organization_id
5791: AND aov.object_name = 'AMW_ORG_PROCESS'
5792: AND aov.opinion_type_code = 'EVALUATION'

Line 5804: AMW_OPINION_MV aov

5800:
5801: CURSOR unmitigated_risks IS
5802: SELECT count(distinct ara.risk_association_id)
5803: FROM AMW_RISK_ASSOCIATIONS ara,
5804: AMW_OPINION_MV aov
5805: WHERE ara.object_type = 'PROCESS_FINCERT'
5806: AND ara.pk1= p_certification_id
5807: AND ara.pk2= p_organization_id
5808: AND aov.object_name = 'AMW_ORG_PROCESS_RISK'

Line 5835: AMW_OPINION_MV aov

5831:
5832: CURSOR verified_risks IS
5833: SELECT count(distinct ara.risk_association_id)
5834: FROM AMW_RISK_ASSOCIATIONS ara,
5835: AMW_OPINION_MV aov
5836: WHERE ara.object_type = 'PROCESS_FINCERT'
5837: AND ara.pk1= p_certification_id
5838: AND ara.pk2= p_organization_id
5839: AND aov.object_name = 'AMW_ORG_PROCESS_RISK'

Line 5851: AMW_OPINION_MV aov

5847:
5848: CURSOR ineffective_controls IS
5849: SELECT count(distinct aca.control_id)
5850: FROM AMW_CONTROL_ASSOCIATIONS aca ,
5851: AMW_OPINION_MV aov
5852: WHERE aca.object_type = 'RISK_FINCERT'
5853: AND aca.pk1 = p_certification_id
5854: AND aca.pk2 = p_organization_id
5855: AND aov.object_name = 'AMW_ORG_CONTROL'

Line 5880: AMW_OPINION_MV aov

5876:
5877: CURSOR verified_controls IS
5878: SELECT count(distinct aca.control_id)
5879: FROM AMW_CONTROL_ASSOCIATIONS aca ,
5880: AMW_OPINION_MV aov
5881: WHERE aca.object_type = 'RISK_FINCERT'
5882: AND aca.pk1 = p_certification_id
5883: AND aca.pk2 = p_organization_id
5884: AND aov.object_name = 'AMW_ORG_CONTROL'