DBA Data[Home] [Help]

APPS.AMW_ORG_HIERARCHY_PKG dependencies on AMW_CONTROL_ASSOCIATIONS

Line 1168: insert into amw_control_associations

1164: -- and (APPROVAL_DATE is not null and APPROVAL_DATE <= sysdate)
1165: -- and (DELETION_DATE is null or (DELETION_DATE is not null and DELETION_APPROVAL_DATE is null)));
1166:
1167:
1168: insert into amw_control_associations
1169: (CONTROL_ASSOCIATION_ID,
1170: CONTROL_ID,
1171: PK1,
1172: PK2,

Line 1186: AMW_CONTROL_ASSOCIATIONS_S.nextval,

1182: CREATED_BY,
1183: LAST_UPDATE_LOGIN,
1184: OBJECT_VERSION_NUMBER)
1185: (select
1186: AMW_CONTROL_ASSOCIATIONS_S.nextval,
1187: CONTROL_ID,
1188: p_org_id,
1189: PK1,
1190: PK2,

Line 1202: from amw_control_associations

1198: sysdate,
1199: G_USER_ID,
1200: G_LOGIN_ID,
1201: 1
1202: from amw_control_associations
1203: where PK1 = p_child_process_id
1204: and object_type = 'RISK'
1205: and approval_date is not null
1206: and deletion_approval_date is null);

Line 1248: from amw_objective_associations o, amw_control_associations c

1244: sysdate,
1245: G_USER_ID,
1246: G_LOGIN_ID,
1247: 1
1248: from amw_objective_associations o, amw_control_associations c
1249: where o.object_type = 'CONTROL'
1250: and o.approval_date is not null
1251: and o.deletion_approval_date is null
1252: and c.object_type = 'RISK_ORG'

Line 1303: from amw_control_associations

1299: 1
1300: from amw_ap_associations
1301: where PK1 in --ko, replacing = with in controls can be more than one..
1302: (select distinct control_id
1303: from amw_control_associations
1304: where PK1 = p_child_process_id
1305: and object_type = 'RISK'
1306: and (APPROVAL_DATE is not null and APPROVAL_DATE <= sysdate)
1307: and (DELETION_DATE is null or (DELETION_DATE is not null and DELETION_APPROVAL_DATE is null)))

Line 1501: delete amw_control_associations

1497: and deletion_date is null;
1498:
1499: --ko, Similarly for controls also..
1500:
1501: delete amw_control_associations
1502: where pk1 = p_org_id
1503: and pk2 = p_process_id
1504: and object_type = 'RISK_ORG'
1505: and approval_date is null;

Line 1507: update amw_control_associations

1503: and pk2 = p_process_id
1504: and object_type = 'RISK_ORG'
1505: and approval_date is null;
1506:
1507: update amw_control_associations
1508: set DELETION_DATE = sysdate
1509: where pk1 = p_org_id
1510: and pk2 = p_process_id
1511: and object_type = 'RISK_ORG'

Line 2628: select distinct control_id from amw_control_associations

2624: if x.exists(1) then
2625: forall ctr in x.first .. x.last
2626: update amw_process_organization
2627: set control_count_latest = (select count(*) from (
2628: select distinct control_id from amw_control_associations
2629: where pk1 = p_org_id
2630: and pk2 in ( select child_id
2631: from amw_latest_hierarchies
2632: start with child_id = x(ctr) and organization_id = p_org_id

Line 2812: select distinct control_id from amw_control_associations

2808: if x.exists(1) then
2809: forall ctr in x.first .. x.last
2810: update amw_process_organization
2811: set control_count= (select count(*) from (
2812: select distinct control_id from amw_control_associations
2813: where pk1 = p_org_id
2814: and pk2 in ( select child_id
2815: from amw_approved_hierarchies
2816: start with child_id = x(ctr) and organization_id = p_org_id

Line 3071: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA

3067: and ARA.deletion_date is null
3068: and ARA.object_type = 'PROCESS_ORG'
3069: ),
3070: APO.control_count_latest = (
3071: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA
3072: where ACA.pk1 = APO.ORGANIZATION_ID
3073: and ACA.pk2 in ( select alh.child_id
3074: from amw_latest_hierarchies alh
3075: start with alh.child_id = APO.PROCESS_ID and alh.organization_id = APO.ORGANIZATION_ID

Line 3124: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA

3120: and ARA.deletion_date is null
3121: and ARA.object_type = 'PROCESS_ORG'
3122: ),
3123: APO.control_count_latest = (
3124: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA
3125: where ACA.pk1 = APO.ORGANIZATION_ID
3126: and ACA.pk2 in ( select alh.child_id
3127: from amw_latest_hierarchies alh
3128: start with alh.child_id = APO.PROCESS_ID and alh.organization_id = APO.ORGANIZATION_ID

Line 3194: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA

3190: and ARA.deletion_approval_date is null
3191: and ARA.object_type = 'PROCESS_ORG'
3192: ),
3193: APO.control_count = (
3194: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA
3195: where ACA.pk1 = APO.ORGANIZATION_ID
3196: and ACA.pk2 in ( select alh.child_id
3197: from amw_approved_hierarchies alh
3198: start with alh.child_id = APO.PROCESS_ID and alh.organization_id = APO.ORGANIZATION_ID

Line 3255: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA

3251: and ARA.deletion_approval_date is null
3252: and ARA.object_type = 'PROCESS_ORG'
3253: ),
3254: APO.control_count = (
3255: select count(distinct ACA.CONTROL_ID) from amw_control_associations ACA
3256: where ACA.pk1 = APO.ORGANIZATION_ID
3257: and ACA.pk2 in ( select alh.child_id
3258: from amw_approved_hierarchies alh
3259: start with alh.child_id = APO.PROCESS_ID and alh.organization_id = APO.ORGANIZATION_ID

Line 3619: select distinct control_id from amw_control_associations

3615: and deletion_date is null
3616: and object_type = 'PROCESS_ORG'
3617: ) ),
3618: control_count_latest = (select count(*) from (
3619: select distinct control_id from amw_control_associations
3620: where pk1 = l_orgs_tbl(ctr)
3621: and pk2 in (select alh.child_id
3622: from amw_latest_hierarchies alh
3623: start with alh.child_id = l_procs_tbl(ctr) and alh.organization_id = l_orgs_tbl(ctr)

Line 3678: select distinct control_id from amw_control_associations

3674: and deletion_approval_date is null
3675: and object_type = 'PROCESS_ORG'
3676: ) ),
3677: control_count= (select count(*) from (
3678: select distinct control_id from amw_control_associations
3679: where pk1 = l_orgs_tbl(ctr)
3680: and pk2 in ( select alh.child_id
3681: from amw_approved_hierarchies alh
3682: start with alh.child_id = l_procs_tbl(ctr) and alh.organization_id = l_orgs_tbl(ctr)

Line 4939: delete from amw_control_associations

4935: l_risk_exists := TRUE;
4936: END IF;
4937:
4938:
4939: delete from amw_control_associations
4940: where pk1 = p_organization_id
4941: and pk2 = p_process_id
4942: and approval_date is null
4943: and object_type = 'RISK_ORG';

Line 4948: update amw_control_associations

4944: IF SQL%FOUND THEN
4945: l_control_exists := TRUE;
4946: END IF;
4947:
4948: update amw_control_associations
4949: set deletion_date = null
4950: where pk1 = p_organization_id
4951: and pk2 = p_process_id
4952: and object_type = 'RISK_ORG'

Line 5117: amw_control_associations

5113: 1
5114: from
5115: amw_ap_associations APA,
5116: (SELECT distinct control_id from
5117: amw_control_associations
5118: where object_type = 'RISK_ORG'
5119: AND PK1 = p_organization_id
5120: AND PK2 = p_process_id
5121: AND association_creation_date = p_date

Line 5141: amw_control_associations

5137: and pk1 = p_organization_id
5138: and pk2 = p_process_id
5139: and association_creation_date is null
5140: and pk3 not in ( SELECT control_id from
5141: amw_control_associations
5142: where object_type = 'RISK_ORG'
5143: AND PK1 = p_organization_id
5144: AND PK2 = p_process_id
5145: AND approval_date is null);

Line 5239: amw_control_associations

5235: 1
5236: from
5237: amw_ap_associations APA,
5238: (SELECT distinct control_id from
5239: amw_control_associations
5240: where object_type = 'ENTITY_CONTROL'
5241: AND PK1 = p_organization_id
5242: AND association_creation_date = p_date ) CONTROLS
5243: where APA.object_type = 'CTRL'

Line 5258: amw_control_associations

5254: DELETE FROM AMW_AP_ASSOCIATIONS
5255: WHERE object_type = 'ENTITY_AP'
5256: and pk1 = p_organization_id
5257: and pk2 not in ( SELECT control_id from
5258: amw_control_associations
5259: where object_type = 'ENTITY_CONTROL'
5260: AND PK1 = p_organization_id
5261: );
5262:

Line 5922: delete amw_control_associations

5918: and object_type = 'PROCESS_ORG'
5919: and deletion_date is null));
5920:
5921: -- SECOND SYNC UP THE CONTROLS.
5922: delete amw_control_associations
5923: where pk1 = p_org_id
5924: and pk2 = p_process_id
5925: and object_type = 'RISK_ORG'
5926: and approval_date is null;

Line 5928: update amw_control_associations

5924: and pk2 = p_process_id
5925: and object_type = 'RISK_ORG'
5926: and approval_date is null;
5927:
5928: update amw_control_associations
5929: set DELETION_DATE = sysdate
5930: where pk1 = p_org_id
5931: and pk2 = p_process_id
5932: and object_type = 'RISK_ORG'

Line 5935: from amw_control_associations

5931: and pk2 = p_process_id
5932: and object_type = 'RISK_ORG'
5933: and deletion_date is null
5934: and (pk3, control_id) not in (select pk2, control_id
5935: from amw_control_associations
5936: where pk1 = p_process_id
5937: and object_type = 'RISK'
5938: and approval_date is not null
5939: and deletion_approval_date is null);

Line 5940: insert into amw_control_associations

5936: where pk1 = p_process_id
5937: and object_type = 'RISK'
5938: and approval_date is not null
5939: and deletion_approval_date is null);
5940: insert into amw_control_associations
5941: (CONTROL_ASSOCIATION_ID,
5942: CONTROL_ID,
5943: PK1,
5944: PK2,

Line 5958: AMW_CONTROL_ASSOCIATIONS_S.nextval,

5954: CREATED_BY,
5955: LAST_UPDATE_LOGIN,
5956: OBJECT_VERSION_NUMBER)
5957: (select
5958: AMW_CONTROL_ASSOCIATIONS_S.nextval,
5959: CONTROL_ID,
5960: p_org_id,
5961: PK1,
5962: PK2,

Line 5974: from amw_control_associations

5970: sysdate,
5971: G_USER_ID,
5972: G_LOGIN_ID,
5973: 1
5974: from amw_control_associations
5975: where PK1 = p_process_id
5976: and object_type = 'RISK'
5977: and approval_date is not null
5978: and deletion_approval_date is null

Line 5980: from amw_control_associations

5976: and object_type = 'RISK'
5977: and approval_date is not null
5978: and deletion_approval_date is null
5979: and (pk2, control_id) not in(select pk3,control_id
5980: from amw_control_associations
5981: where pk1 = p_org_id
5982: and pk2 = p_process_id
5983: and object_type = 'RISK_ORG'
5984: and deletion_date is null));

Line 6045: from amw_control_associations

6041: 1
6042: from amw_ap_associations
6043: where PK1 in --ko, replacing = with in controls can be more than one..
6044: (select distinct control_id
6045: from amw_control_associations
6046: where PK1 = p_process_id
6047: and object_type = 'RISK'
6048: and (APPROVAL_DATE is not null and APPROVAL_DATE <= sysdate)
6049: and (DELETION_DATE is null or (DELETION_DATE is not null and DELETION_APPROVAL_DATE is null)))

Line 6257: insert into amw_control_associations

6253: and pk2 = p_process_id
6254: and object_type = 'PROCESS_ORG'
6255: and deletion_date is null));
6256: -- Add controls...
6257: insert into amw_control_associations
6258: (CONTROL_ASSOCIATION_ID,
6259: CONTROL_ID,
6260: PK1,
6261: PK2,

Line 6275: AMW_CONTROL_ASSOCIATIONS_S.nextval,

6271: CREATED_BY,
6272: LAST_UPDATE_LOGIN,
6273: OBJECT_VERSION_NUMBER)
6274: (select
6275: AMW_CONTROL_ASSOCIATIONS_S.nextval,
6276: CONTROL_ID,
6277: p_org_id,
6278: PK1,
6279: PK2,

Line 6291: from amw_control_associations

6287: sysdate,
6288: G_USER_ID,
6289: G_LOGIN_ID,
6290: 1
6291: from amw_control_associations
6292: where PK1 = p_process_id
6293: and object_type = 'RISK'
6294: and approval_date is not null
6295: and deletion_approval_date is null

Line 6297: from amw_control_associations

6293: and object_type = 'RISK'
6294: and approval_date is not null
6295: and deletion_approval_date is null
6296: and (pk2, control_id) not in(select pk3,control_id
6297: from amw_control_associations
6298: where pk1 = p_org_id
6299: and pk2 = p_process_id
6300: and object_type = 'RISK_ORG'
6301: and deletion_date is null));

Line 6345: from amw_control_associations

6341: 1
6342: from amw_ap_associations
6343: where PK1 in --ko, replacing = with in controls can be more than one..
6344: (select distinct control_id
6345: from amw_control_associations
6346: where PK1 = p_process_id
6347: and object_type = 'RISK'
6348: and (APPROVAL_DATE is not null and APPROVAL_DATE <= sysdate)
6349: and (DELETION_DATE is null or (DELETION_DATE is not null and DELETION_APPROVAL_DATE is null)))

Line 6567: delete amw_control_associations

6563: and deletion_date is null));
6564:
6565: -- SECOND SYNC UP THE CONTROLS.
6566: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6567: delete amw_control_associations
6568: where pk1 = Org_Ids(indx)
6569: and pk2 = p_process_id
6570: and object_type = 'RISK_ORG'
6571: and approval_date is null;

Line 6574: update amw_control_associations

6570: and object_type = 'RISK_ORG'
6571: and approval_date is null;
6572:
6573: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6574: update amw_control_associations
6575: set DELETION_DATE = sysdate
6576: where pk1 = Org_Ids(indx)
6577: and pk2 = p_process_id
6578: and object_type = 'RISK_ORG'

Line 6581: from amw_control_associations

6577: and pk2 = p_process_id
6578: and object_type = 'RISK_ORG'
6579: and deletion_date is null
6580: and (pk3, control_id) not in (select pk2, control_id
6581: from amw_control_associations
6582: where pk1 = p_process_id
6583: and object_type = 'RISK'
6584: and approval_date is not null
6585: and deletion_approval_date is null);

Line 6588: insert into amw_control_associations

6584: and approval_date is not null
6585: and deletion_approval_date is null);
6586:
6587: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6588: insert into amw_control_associations
6589: (CONTROL_ASSOCIATION_ID,
6590: CONTROL_ID,
6591: PK1,
6592: PK2,

Line 6606: AMW_CONTROL_ASSOCIATIONS_S.nextval,

6602: CREATED_BY,
6603: LAST_UPDATE_LOGIN,
6604: OBJECT_VERSION_NUMBER)
6605: (select
6606: AMW_CONTROL_ASSOCIATIONS_S.nextval,
6607: CONTROL_ID,
6608: Org_Ids(indx),
6609: PK1,
6610: PK2,

Line 6622: from amw_control_associations

6618: sysdate,
6619: G_USER_ID,
6620: G_LOGIN_ID,
6621: 1
6622: from amw_control_associations
6623: where PK1 = p_process_id
6624: and object_type = 'RISK'
6625: and approval_date is not null
6626: and deletion_approval_date is null

Line 6628: from amw_control_associations

6624: and object_type = 'RISK'
6625: and approval_date is not null
6626: and deletion_approval_date is null
6627: and (pk2, control_id) not in(select pk3,control_id
6628: from amw_control_associations
6629: where pk1 = Org_Ids(indx)
6630: and pk2 = p_process_id
6631: and object_type = 'RISK_ORG'
6632: and deletion_date is null));

Line 6699: from amw_control_associations

6695: 1
6696: from amw_ap_associations
6697: where PK1 in --ko, replacing = with in controls can be more than one..
6698: (select distinct control_id
6699: from amw_control_associations
6700: where PK1 = p_process_id
6701: and object_type = 'RISK'
6702: and (APPROVAL_DATE is not null and APPROVAL_DATE <= sysdate)
6703: and (DELETION_DATE is null or (DELETION_DATE is not null and DELETION_APPROVAL_DATE is null)))

Line 6859: insert into amw_control_associations

6855: and object_type = 'PROCESS_ORG'
6856: and deletion_date is null));
6857: -- Add controls...
6858: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6859: insert into amw_control_associations
6860: (CONTROL_ASSOCIATION_ID,
6861: CONTROL_ID,
6862: PK1,
6863: PK2,

Line 6877: AMW_CONTROL_ASSOCIATIONS_S.nextval,

6873: CREATED_BY,
6874: LAST_UPDATE_LOGIN,
6875: OBJECT_VERSION_NUMBER)
6876: (select
6877: AMW_CONTROL_ASSOCIATIONS_S.nextval,
6878: CONTROL_ID,
6879: Org_Ids(indx),
6880: PK1,
6881: PK2,

Line 6893: from amw_control_associations

6889: sysdate,
6890: G_USER_ID,
6891: G_LOGIN_ID,
6892: 1
6893: from amw_control_associations
6894: where PK1 = p_process_id
6895: and object_type = 'RISK'
6896: and approval_date is not null
6897: and deletion_approval_date is null

Line 6899: from amw_control_associations

6895: and object_type = 'RISK'
6896: and approval_date is not null
6897: and deletion_approval_date is null
6898: and (pk2, control_id) not in (select pk3,control_id
6899: from amw_control_associations
6900: where pk1 = Org_Ids(indx)
6901: and pk2 = p_process_id
6902: and object_type = 'RISK_ORG'
6903: and deletion_date is null));

Line 6948: from amw_control_associations

6944: 1
6945: from amw_ap_associations
6946: where PK1 in --ko, replacing = with in controls can be more than one..
6947: (select distinct control_id
6948: from amw_control_associations
6949: where PK1 = p_process_id
6950: and object_type = 'RISK'
6951: and (APPROVAL_DATE is not null and APPROVAL_DATE <= sysdate)
6952: and (DELETION_DATE is null or (DELETION_DATE is not null and DELETION_APPROVAL_DATE is null)))