DBA Data[Home] [Help]

APPS.AMW_ORG_HIERARCHY_PKG dependencies on AMW_OBJECTIVE_ASSOCIATIONS

Line 1068: insert into amw_objective_associations

1064: where PK1 = p_child_process_id
1065: and object_type = 'PROCESS'
1066: and approval_date is not null
1067: and deletion_approval_date is null);
1068: insert into amw_objective_associations
1069: (OBJECTIVE_ASSOCIATION_ID,
1070: PROCESS_OBJECTIVE_ID,
1071: PK1,
1072: PK2,

Line 1085: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

1081: CREATED_BY,
1082: LAST_UPDATE_LOGIN,
1083: OBJECT_VERSION_NUMBER)
1084: (select
1085: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
1086: PROCESS_OBJECTIVE_ID,
1087: p_org_id,
1088: PK1,
1089: sysdate,

Line 1100: from amw_objective_associations

1096: sysdate,
1097: G_USER_ID,
1098: G_LOGIN_ID,
1099: 1
1100: from amw_objective_associations
1101: where PK1 = p_child_process_id
1102: and object_type = 'PROCESS'
1103: and approval_date is not null
1104: and deletion_approval_date is null);

Line 1212: insert into amw_objective_associations

1208: -- and (DELETION_DATE is null or (DELETION_DATE is not null and DELETION_APPROVAL_DATE is null)));
1209:
1210:
1211: -- abedajna, control objective import
1212: insert into amw_objective_associations
1213: (OBJECTIVE_ASSOCIATION_ID,
1214: PROCESS_OBJECTIVE_ID,
1215: PK1,
1216: PK2,

Line 1231: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

1227: CREATED_BY,
1228: LAST_UPDATE_LOGIN,
1229: OBJECT_VERSION_NUMBER)
1230: (select
1231: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
1232: o.PROCESS_OBJECTIVE_ID,
1233: p_org_id,
1234: o.PK1,
1235: o.PK2,

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 1515: delete amw_objective_associations

1511: and object_type = 'RISK_ORG'
1512: and deletion_date is null;
1513:
1514: -- abedajna, control objectives
1515: delete amw_objective_associations
1516: where pk1 = p_org_id
1517: and pk2 = p_process_id
1518: and object_type = 'CONTROL_ORG'
1519: and approval_date is null;

Line 1521: update amw_objective_associations

1517: and pk2 = p_process_id
1518: and object_type = 'CONTROL_ORG'
1519: and approval_date is null;
1520:
1521: update amw_objective_associations
1522: set DELETION_DATE = sysdate
1523: where pk1 = p_org_id
1524: and pk2 = p_process_id
1525: and object_type = 'CONTROL_ORG'

Line 4975: delete from amw_objective_associations

4971: and deletion_date is not null
4972: and deletion_approval_date is null;
4973:
4974:
4975: delete from amw_objective_associations
4976: where pk1 = p_organization_id
4977: and pk2 = p_process_id
4978: and approval_date is null
4979: and object_type in ('PROCESS_ORG', 'CONTROL_ORG');

Line 4981: update amw_objective_associations

4977: and pk2 = p_process_id
4978: and approval_date is null
4979: and object_type in ('PROCESS_ORG', 'CONTROL_ORG');
4980:
4981: update amw_objective_associations
4982: set deletion_date = null
4983: where pk1 = p_organization_id
4984: and pk2 = p_process_id
4985: and object_type in ('PROCESS_ORG', 'CONTROL_ORG')

Line 5495: delete from amw_objective_associations

5491: ,p_org_id => p_org_id
5492: ,p_add_upd_flag => 'U');
5493: -- Copy Objectives...by dpatel
5494: --first delete all the unapproved rows...by dpatel
5495: delete from amw_objective_associations
5496: where pk1 = p_org_id
5497: and pk2 = p_process_id
5498: and object_type = 'PROCESS_ORG'
5499: and approval_date is null;

Line 5502: update amw_objective_associations

5498: and object_type = 'PROCESS_ORG'
5499: and approval_date is null;
5500:
5501: --then delete existing objectives that are not found in RL process...by dpatel
5502: update amw_objective_associations
5503: set deletion_date = sysdate
5504: where pk1 = p_org_id
5505: and pk2 = p_process_id
5506: and object_type = 'PROCESS_ORG'

Line 5509: from amw_objective_associations

5505: and pk2 = p_process_id
5506: and object_type = 'PROCESS_ORG'
5507: and deletion_date is null
5508: and PROCESS_OBJECTIVE_ID not in (select PROCESS_OBJECTIVE_ID
5509: from amw_objective_associations
5510: where pk1 = p_process_id
5511: and object_type = 'PROCESS'
5512: and approval_date is not null
5513: and deletion_approval_date is null);

Line 5515: insert into amw_objective_associations

5511: and object_type = 'PROCESS'
5512: and approval_date is not null
5513: and deletion_approval_date is null);
5514: --add objectives from the RL...by dpatel
5515: insert into amw_objective_associations
5516: (OBJECTIVE_ASSOCIATION_ID,
5517: PROCESS_OBJECTIVE_ID,
5518: PK1,
5519: PK2,

Line 5532: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

5528: CREATED_BY,
5529: LAST_UPDATE_LOGIN,
5530: OBJECT_VERSION_NUMBER)
5531: (select
5532: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
5533: PROCESS_OBJECTIVE_ID,
5534: p_org_id,
5535: PK1,
5536: sysdate,

Line 5547: from amw_objective_associations

5543: sysdate,
5544: G_USER_ID,
5545: G_LOGIN_ID,
5546: 1
5547: from amw_objective_associations
5548: where PK1 = p_process_id
5549: and object_type = 'PROCESS'
5550: and approval_date is not null
5551: and deletion_approval_date is null

Line 5553: from amw_objective_associations

5549: and object_type = 'PROCESS'
5550: and approval_date is not null
5551: and deletion_approval_date is null
5552: and PROCESS_OBJECTIVE_ID not in (select PROCESS_OBJECTIVE_ID
5553: from amw_objective_associations
5554: where
5555: PK1 = p_org_id
5556: and PK2 = p_process_id
5557: and object_type = 'PROCESS_ORG'

Line 5770: delete from amw_objective_associations

5766: ,p_add_upd_flag => 'U');
5767: END LOOP;
5768:
5769: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
5770: delete from amw_objective_associations
5771: where pk1 = Org_Ids(indx)
5772: and pk2 = p_process_id
5773: and object_type = 'PROCESS_ORG'
5774: and approval_date is null;

Line 5777: update amw_objective_associations

5773: and object_type = 'PROCESS_ORG'
5774: and approval_date is null;
5775:
5776: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
5777: update amw_objective_associations
5778: set deletion_date = sysdate
5779: where pk1 = Org_Ids(indx)
5780: and pk2 = p_process_id
5781: and object_type = 'PROCESS_ORG'

Line 5784: from amw_objective_associations

5780: and pk2 = p_process_id
5781: and object_type = 'PROCESS_ORG'
5782: and deletion_date is null
5783: and PROCESS_OBJECTIVE_ID not in (select PROCESS_OBJECTIVE_ID
5784: from amw_objective_associations
5785: where pk1 = p_process_id
5786: and object_type = 'PROCESS'
5787: and approval_date is not null
5788: and deletion_approval_date is null);

Line 5791: insert into amw_objective_associations

5787: and approval_date is not null
5788: and deletion_approval_date is null);
5789:
5790: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
5791: insert into amw_objective_associations
5792: (OBJECTIVE_ASSOCIATION_ID,
5793: PROCESS_OBJECTIVE_ID,
5794: PK1,
5795: PK2,

Line 5808: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

5804: CREATED_BY,
5805: LAST_UPDATE_LOGIN,
5806: OBJECT_VERSION_NUMBER)
5807: (select
5808: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
5809: PROCESS_OBJECTIVE_ID,
5810: Org_Ids(indx),
5811: PK1,
5812: sysdate,

Line 5823: from amw_objective_associations

5819: sysdate,
5820: G_USER_ID,
5821: G_LOGIN_ID,
5822: 1
5823: from amw_objective_associations
5824: where PK1 = p_process_id
5825: and object_type = 'PROCESS'
5826: and approval_date is not null
5827: and deletion_approval_date is null

Line 5829: from amw_objective_associations

5825: and object_type = 'PROCESS'
5826: and approval_date is not null
5827: and deletion_approval_date is null
5828: and PROCESS_OBJECTIVE_ID not in (select PROCESS_OBJECTIVE_ID
5829: from amw_objective_associations
5830: where
5831: PK1 = Org_Ids(indx)
5832: and PK2 = p_process_id
5833: and object_type = 'PROCESS_ORG'

Line 6061: delete amw_objective_associations

6057: and object_type = 'CTRL_ORG'
6058: and deletion_date is null));
6059: -- FOURTH..OBJECTIVES...
6060:
6061: delete amw_objective_associations
6062: where pk1 = p_org_id
6063: and pk2 = p_process_id
6064: -- and object_type IN ('PROCESS_ORG','CONTROL_ORG') ...by dpatel
6065: and object_type = 'CONTROL_ORG'

Line 6068: update amw_objective_associations

6064: -- and object_type IN ('PROCESS_ORG','CONTROL_ORG') ...by dpatel
6065: and object_type = 'CONTROL_ORG'
6066: and approval_date is null;
6067: -- UPDATE CONTROL OBJECTIVES....
6068: update amw_objective_associations
6069: set DELETION_DATE = sysdate
6070: where pk1 = p_org_id
6071: and pk2 = p_process_id
6072: and object_type = 'CONTROL_ORG'

Line 6075: from amw_objective_associations

6071: and pk2 = p_process_id
6072: and object_type = 'CONTROL_ORG'
6073: and deletion_date is null
6074: and (pk3,pk4,process_objective_id) not in (select pk2,pk3, process_objective_id
6075: from amw_objective_associations
6076: where pk1 = p_process_id
6077: and object_type = 'CONTROL'
6078: and approval_date is not null
6079: and deletion_approval_date is null);

Line 6082: update amw_objective_associations

6078: and approval_date is not null
6079: and deletion_approval_date is null);
6080: /*...by dpatel
6081: -- UPDATE PROCESS OBJECTIVES..
6082: update amw_objective_associations
6083: set DELETION_DATE = sysdate
6084: where pk1 = p_org_id
6085: and pk2 = p_process_id
6086: and object_type = 'PROCESS_ORG'

Line 6089: from amw_objective_associations

6085: and pk2 = p_process_id
6086: and object_type = 'PROCESS_ORG'
6087: and deletion_date is null
6088: and process_objective_id not in (select process_objective_id
6089: from amw_objective_associations
6090: where pk1 = p_process_id
6091: and object_type = 'PROCESS'
6092: and approval_date is not null
6093: and deletion_approval_date is null);

Line 6095: insert into amw_objective_associations

6091: and object_type = 'PROCESS'
6092: and approval_date is not null
6093: and deletion_approval_date is null);
6094: -- INSERT PROCESS OBJECTIVES..
6095: insert into amw_objective_associations
6096: (OBJECTIVE_ASSOCIATION_ID,
6097: PROCESS_OBJECTIVE_ID,
6098: PK1,
6099: PK2,

Line 6112: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

6108: CREATED_BY,
6109: LAST_UPDATE_LOGIN,
6110: OBJECT_VERSION_NUMBER)
6111: (select
6112: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
6113: PROCESS_OBJECTIVE_ID,
6114: p_org_id,
6115: PK1,
6116: sysdate,

Line 6127: from amw_objective_associations

6123: sysdate,
6124: G_USER_ID,
6125: G_LOGIN_ID,
6126: 1
6127: from amw_objective_associations
6128: where PK1 = p_process_id
6129: and object_type = 'PROCESS'
6130: and approval_date is not null
6131: and deletion_approval_date is null

Line 6133: from amw_objective_associations

6129: and object_type = 'PROCESS'
6130: and approval_date is not null
6131: and deletion_approval_date is null
6132: and process_objective_id not in(select process_objective_id
6133: from amw_objective_associations
6134: where pk1 = p_org_id
6135: and pk2 = p_process_id
6136: and object_type = 'PROCESS_ORG'
6137: and deletion_date is null));

Line 6140: insert into amw_objective_associations

6136: and object_type = 'PROCESS_ORG'
6137: and deletion_date is null));
6138: */
6139: -- Insert Control Objectives...
6140: insert into amw_objective_associations
6141: (OBJECTIVE_ASSOCIATION_ID,
6142: PROCESS_OBJECTIVE_ID,
6143: PK1,
6144: PK2,

Line 6159: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

6155: CREATED_BY,
6156: LAST_UPDATE_LOGIN,
6157: OBJECT_VERSION_NUMBER)
6158: (select
6159: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
6160: PROCESS_OBJECTIVE_ID,
6161: p_org_id,
6162: PK1,
6163: PK2,

Line 6176: from amw_objective_associations

6172: sysdate,
6173: G_USER_ID,
6174: G_LOGIN_ID,
6175: 1
6176: from amw_objective_associations
6177: where object_type = 'CONTROL'
6178: and pk1 = p_process_id
6179: and approval_date is not null
6180: and deletion_approval_date is null

Line 6182: from amw_objective_associations

6178: and pk1 = p_process_id
6179: and approval_date is not null
6180: and deletion_approval_date is null
6181: and (pk2,pk3,process_objective_id) not in (select pk3,pk4, process_objective_id
6182: from amw_objective_associations
6183: where pk1 = p_org_id
6184: and pk2 = p_process_id
6185: and object_type = 'CONTROL_ORG'
6186: and deletion_date is null));

Line 6188: update amw_objective_associations

6184: and pk2 = p_process_id
6185: and object_type = 'CONTROL_ORG'
6186: and deletion_date is null));
6187: --delete the control objectives which are not present in 'PROCESS_ORG'...by dpatel
6188: update amw_objective_associations
6189: set DELETION_DATE = sysdate
6190: where pk1 = p_org_id
6191: and pk2 = p_process_id
6192: and object_type = 'CONTROL_ORG'

Line 6195: from amw_objective_associations

6191: and pk2 = p_process_id
6192: and object_type = 'CONTROL_ORG'
6193: and deletion_date is null
6194: and process_objective_id not in (select process_objective_id
6195: from amw_objective_associations
6196: where pk1 = p_org_id
6197: and pk2 = p_process_id
6198: and object_type = 'PROCESS_ORG'
6199: and deletion_date is null);

Line 6361: insert into amw_objective_associations

6357: and object_type = 'CTRL_ORG'
6358: and deletion_date is null));
6359: /*...by dpatel
6360: -- INSERT PROCESS OBJECTIVES..
6361: insert into amw_objective_associations
6362: (OBJECTIVE_ASSOCIATION_ID,
6363: PROCESS_OBJECTIVE_ID,
6364: PK1,
6365: PK2,

Line 6378: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

6374: CREATED_BY,
6375: LAST_UPDATE_LOGIN,
6376: OBJECT_VERSION_NUMBER)
6377: (select
6378: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
6379: PROCESS_OBJECTIVE_ID,
6380: p_org_id,
6381: PK1,
6382: sysdate,

Line 6393: from amw_objective_associations

6389: sysdate,
6390: G_USER_ID,
6391: G_LOGIN_ID,
6392: 1
6393: from amw_objective_associations
6394: where PK1 = p_process_id
6395: and object_type = 'PROCESS'
6396: and approval_date is not null
6397: and deletion_approval_date is null

Line 6399: from amw_objective_associations

6395: and object_type = 'PROCESS'
6396: and approval_date is not null
6397: and deletion_approval_date is null
6398: and process_objective_id not in(select process_objective_id
6399: from amw_objective_associations
6400: where pk1 = p_org_id
6401: and pk2 = p_process_id
6402: and object_type = 'PROCESS_ORG'
6403: and deletion_date is null));

Line 6406: insert into amw_objective_associations

6402: and object_type = 'PROCESS_ORG'
6403: and deletion_date is null));
6404: */
6405: --Insert Control Objectives...by dpatel
6406: insert into amw_objective_associations
6407: (OBJECTIVE_ASSOCIATION_ID,
6408: PROCESS_OBJECTIVE_ID,
6409: PK1,
6410: PK2,

Line 6425: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

6421: CREATED_BY,
6422: LAST_UPDATE_LOGIN,
6423: OBJECT_VERSION_NUMBER)
6424: (select
6425: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
6426: PROCESS_OBJECTIVE_ID,
6427: p_org_id,
6428: PK1,
6429: PK2,

Line 6442: from amw_objective_associations

6438: sysdate,
6439: G_USER_ID,
6440: G_LOGIN_ID,
6441: 1
6442: from amw_objective_associations
6443: where object_type = 'CONTROL'
6444: and pk1 = p_process_id
6445: and approval_date is not null
6446: and deletion_approval_date is null

Line 6448: from amw_objective_associations

6444: and pk1 = p_process_id
6445: and approval_date is not null
6446: and deletion_approval_date is null
6447: and (pk2,pk3,process_objective_id) not in (select pk3,pk4, process_objective_id
6448: from amw_objective_associations
6449: where pk1 = p_org_id
6450: and pk2 = p_process_id
6451: and object_type = 'CONTROL_ORG'
6452: and deletion_date is null)

Line 6453: and (pk2,pk3) not in (select pk3,pk4 from amw_objective_associations

6449: where pk1 = p_org_id
6450: and pk2 = p_process_id
6451: and object_type = 'CONTROL_ORG'
6452: and deletion_date is null)
6453: and (pk2,pk3) not in (select pk3,pk4 from amw_objective_associations
6454: where pk1 = p_org_id
6455: and pk2 = p_process_id
6456: and object_type = 'CONTROL_ORG'
6457: and deletion_date is null)

Line 6460: update amw_objective_associations

6456: and object_type = 'CONTROL_ORG'
6457: and deletion_date is null)
6458: );
6459: --delete the control objectives which are not present in 'PROCESS_ORG'...by dpatel
6460: update amw_objective_associations
6461: set DELETION_DATE = sysdate
6462: where pk1 = p_org_id
6463: and pk2 = p_process_id
6464: and object_type = 'CONTROL_ORG'

Line 6467: from amw_objective_associations

6463: and pk2 = p_process_id
6464: and object_type = 'CONTROL_ORG'
6465: and deletion_date is null
6466: and process_objective_id not in (select process_objective_id
6467: from amw_objective_associations
6468: where pk1 = p_org_id
6469: and pk2 = p_process_id
6470: and object_type = 'PROCESS_ORG'
6471: and deletion_date is null);

Line 6716: delete amw_objective_associations

6712: and deletion_date is null));
6713: -- FOURTH..OBJECTIVES...
6714:
6715: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6716: delete amw_objective_associations
6717: where pk1 = Org_Ids(indx)
6718: and pk2 = p_process_id
6719: and object_type = 'CONTROL_ORG'
6720: and approval_date is null;

Line 6724: update amw_objective_associations

6720: and approval_date is null;
6721:
6722: -- UPDATE CONTROL OBJECTIVES....
6723: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6724: update amw_objective_associations
6725: set DELETION_DATE = sysdate
6726: where pk1 = Org_Ids(indx)
6727: and pk2 = p_process_id
6728: and object_type = 'CONTROL_ORG'

Line 6731: from amw_objective_associations

6727: and pk2 = p_process_id
6728: and object_type = 'CONTROL_ORG'
6729: and deletion_date is null
6730: and (pk3,pk4,process_objective_id) not in (select pk2,pk3, process_objective_id
6731: from amw_objective_associations
6732: where pk1 = p_process_id
6733: and object_type = 'CONTROL'
6734: and approval_date is not null
6735: and deletion_approval_date is null);

Line 6739: insert into amw_objective_associations

6735: and deletion_approval_date is null);
6736:
6737: -- Insert Control Objectives...
6738: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6739: insert into amw_objective_associations
6740: (OBJECTIVE_ASSOCIATION_ID,
6741: PROCESS_OBJECTIVE_ID,
6742: PK1,
6743: PK2,

Line 6758: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

6754: CREATED_BY,
6755: LAST_UPDATE_LOGIN,
6756: OBJECT_VERSION_NUMBER)
6757: (select
6758: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
6759: PROCESS_OBJECTIVE_ID,
6760: Org_Ids(indx),
6761: PK1,
6762: PK2,

Line 6775: from amw_objective_associations

6771: sysdate,
6772: G_USER_ID,
6773: G_LOGIN_ID,
6774: 1
6775: from amw_objective_associations
6776: where object_type = 'CONTROL'
6777: and pk1 = p_process_id
6778: and approval_date is not null
6779: and deletion_approval_date is null

Line 6781: from amw_objective_associations

6777: and pk1 = p_process_id
6778: and approval_date is not null
6779: and deletion_approval_date is null
6780: and (pk2,pk3,process_objective_id) not in (select pk3,pk4, process_objective_id
6781: from amw_objective_associations
6782: where pk1 = Org_Ids(indx)
6783: and pk2 = p_process_id
6784: and object_type = 'CONTROL_ORG'
6785: and deletion_date is null));

Line 6788: update amw_objective_associations

6784: and object_type = 'CONTROL_ORG'
6785: and deletion_date is null));
6786:
6787: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6788: update amw_objective_associations
6789: set DELETION_DATE = sysdate
6790: where pk1 = Org_Ids(indx)
6791: and pk2 = p_process_id
6792: and object_type = 'CONTROL_ORG'

Line 6795: from amw_objective_associations

6791: and pk2 = p_process_id
6792: and object_type = 'CONTROL_ORG'
6793: and deletion_date is null
6794: and process_objective_id not in (select process_objective_id
6795: from amw_objective_associations
6796: where pk1 = Org_Ids(indx)
6797: and pk2 = p_process_id
6798: and object_type = 'PROCESS_ORG'
6799: and deletion_date is null);

Line 6964: insert into amw_objective_associations

6960: and object_type = 'CTRL_ORG'
6961: and deletion_date is null));
6962:
6963: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
6964: insert into amw_objective_associations
6965: (OBJECTIVE_ASSOCIATION_ID,
6966: PROCESS_OBJECTIVE_ID,
6967: PK1,
6968: PK2,

Line 6983: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,

6979: CREATED_BY,
6980: LAST_UPDATE_LOGIN,
6981: OBJECT_VERSION_NUMBER)
6982: (select
6983: AMW_OBJECTIVE_ASSOCIATIONS_S.nextval,
6984: PROCESS_OBJECTIVE_ID,
6985: Org_Ids(indx),
6986: PK1,
6987: PK2,

Line 7000: from amw_objective_associations

6996: sysdate,
6997: G_USER_ID,
6998: G_LOGIN_ID,
6999: 1
7000: from amw_objective_associations
7001: where object_type = 'CONTROL'
7002: and pk1 = p_process_id
7003: and approval_date is not null
7004: and deletion_approval_date is null

Line 7006: from amw_objective_associations

7002: and pk1 = p_process_id
7003: and approval_date is not null
7004: and deletion_approval_date is null
7005: and (pk2,pk3,process_objective_id) not in (select pk3,pk4, process_objective_id
7006: from amw_objective_associations
7007: where pk1 = Org_Ids(indx)
7008: and pk2 = p_process_id
7009: and object_type = 'CONTROL_ORG'
7010: and deletion_date is null)

Line 7011: and (pk2,pk3) not in (select pk3,pk4 from amw_objective_associations

7007: where pk1 = Org_Ids(indx)
7008: and pk2 = p_process_id
7009: and object_type = 'CONTROL_ORG'
7010: and deletion_date is null)
7011: and (pk2,pk3) not in (select pk3,pk4 from amw_objective_associations
7012: where pk1 = Org_Ids(indx)
7013: and pk2 = p_process_id
7014: and object_type = 'CONTROL_ORG'
7015: and deletion_date is null)

Line 7018: update amw_objective_associations

7014: and object_type = 'CONTROL_ORG'
7015: and deletion_date is null)
7016: );
7017: FORALL indx IN Org_Ids.FIRST .. Org_Ids.LAST
7018: update amw_objective_associations
7019: set DELETION_DATE = sysdate
7020: where pk1 = Org_Ids(indx)
7021: and pk2 = p_process_id
7022: and object_type = 'CONTROL_ORG'

Line 7025: from amw_objective_associations

7021: and pk2 = p_process_id
7022: and object_type = 'CONTROL_ORG'
7023: and deletion_date is null
7024: and process_objective_id not in (select process_objective_id
7025: from amw_objective_associations
7026: where pk1 = Org_Ids(indx)
7027: and pk2 = p_process_id
7028: and object_type = 'PROCESS_ORG'
7029: and deletion_date is null);