DBA Data[Home] [Help]

APPS.AHL_SB_RULES_PVT dependencies on AHL_SB_POSITION_RULES

Line 71: FROM AHL_SB_POSITION_RULES SB,

67: CURSOR get_appl_sb_rules_csr1 (c_uc_header_id NUMBER) IS
68: SELECT SB.rule_id,
69: SB.rule_name,
70: SB.relationship_id
71: FROM AHL_SB_POSITION_RULES SB,
72: AHL_UNIT_CONFIG_HEADERS UC
73: WHERE UC.unit_config_header_id = c_uc_header_id
74: AND SB.mc_header_id = UC.master_config_id
75: -- take only the rules which have MRs accomplished on the unit

Line 83: FROM AHL_SB_POSITION_RULES SB2

79: AND UE.csi_item_instance_id = UC.csi_item_instance_id -- SB MRs are effective on root node
80: AND UE.accomplished_date IS NOT NULL)
81: -- take only the MAX sequence rules for a position, among the accomplished MRs
82: AND SB.rule_sequence = (SELECT MAX(SB2.rule_sequence)
83: FROM AHL_SB_POSITION_RULES SB2
84: WHERE SB2.relationship_id = SB.relationship_id
85: AND EXISTS (SELECT 'X'
86: FROM AHL_UNIT_EFFECTIVITIES_B UE
87: WHERE UE.mr_header_id = SB2.mr_header_id

Line 99: FROM AHL_SB_POSITION_RULES SB,

95: c_visit_id NUMBER) IS
96: SELECT SB.rule_id,
97: SB.rule_name,
98: SB.relationship_id
99: FROM AHL_SB_POSITION_RULES SB,
100: AHL_UNIT_CONFIG_HEADERS UC
101: WHERE UC.unit_config_header_id = c_uc_header_id
102: AND SB.mc_header_id = UC.master_config_id
103: -- take only the rules which have MRs accomplished on the unit

Line 111: FROM AHL_SB_POSITION_RULES SB2

107: AND UE.csi_item_instance_id = UC.csi_item_instance_id -- SB MRs are effective on root node
108: AND UE.accomplished_date IS NOT NULL)
109: -- take only the MAX sequence rules for a position, among the accomplished MRs
110: AND SB.rule_sequence = (SELECT MAX(SB2.rule_sequence)
111: FROM AHL_SB_POSITION_RULES SB2
112: WHERE SB2.relationship_id = SB.relationship_id
113: AND EXISTS (SELECT 'X'
114: FROM AHL_UNIT_EFFECTIVITIES_B UE
115: WHERE UE.mr_header_id = SB2.mr_header_id

Line 124: FROM AHL_SB_POSITION_RULES SB,

120: UNION
121: SELECT SB.rule_id,
122: SB.rule_name,
123: SB.relationship_id
124: FROM AHL_SB_POSITION_RULES SB,
125: AHL_VISIT_TASKS_B VT,
126: AHL_UNIT_CONFIG_HEADERS UC
127: WHERE UC.unit_config_header_id = c_uc_header_id
128: AND SB.mc_header_id = UC.master_config_id

Line 135: FROM AHL_SB_POSITION_RULES SB2

131: AND VT.mr_id = SB.mr_header_id
132: AND VT.status_code NOT IN ('CANCELLED', 'DELETED')
133: -- take only the MAX sequence rules for a position
134: AND SB.rule_sequence = (SELECT MAX(SB2.rule_sequence)
135: FROM AHL_SB_POSITION_RULES SB2
136: WHERE SB2.relationship_id = SB.relationship_id
137: AND SB2.mr_header_id = SB.mr_header_id)
138: AND TRUNC(NVL(SB.active_start_date, SYSDATE)) <= TRUNC(SYSDATE)
139: AND TRUNC(NVL(SB.active_end_date, SYSDATE+1)) > TRUNC(SYSDATE);

Line 386: FROM AHL_SB_POSITION_RULES SB,

382: c_instance_id NUMBER) IS
383: SELECT SB.rule_id,
384: SB.rule_name,
385: SB.relationship_id
386: FROM AHL_SB_POSITION_RULES SB,
387: AHL_UNIT_CONFIG_HEADERS UC
388: WHERE UC.unit_config_header_id = c_uc_header_id
389: AND SB.mc_header_id = UC.master_config_id
390: -- take only the rules which have MRs accomplished on the unit

Line 398: FROM AHL_SB_POSITION_RULES SB2

394: AND UE.csi_item_instance_id = UC.csi_item_instance_id -- SB MRs are effective on root node
395: AND UE.accomplished_date IS NOT NULL)
396: -- take only the MAX sequence rules for a position, among the accomplished MRs
397: AND SB.rule_sequence = (SELECT MAX(SB2.rule_sequence)
398: FROM AHL_SB_POSITION_RULES SB2
399: WHERE SB2.relationship_id = SB.relationship_id
400: AND EXISTS (SELECT 'X'
401: FROM AHL_UNIT_EFFECTIVITIES_B UE
402: WHERE UE.mr_header_id = SB2.mr_header_id

Line 661: FROM AHL_SB_POSITION_RULES SB,

657: CURSOR get_appl_sb_rules_csr (c_uc_header_id NUMBER,
658: c_relationship_id NUMBER) IS
659: SELECT SB.rule_id,
660: SB.rule_name
661: FROM AHL_SB_POSITION_RULES SB,
662: AHL_UNIT_CONFIG_HEADERS UC
663: WHERE UC.unit_config_header_id = c_uc_header_id
664: AND SB.mc_header_id = UC.master_config_id
665: -- take only the rules which have MRs accomplished on the unit

Line 673: FROM AHL_SB_POSITION_RULES SB2

669: AND UE.csi_item_instance_id = UC.csi_item_instance_id -- SB MRs are effective on root node
670: AND UE.accomplished_date IS NOT NULL)
671: -- take only the MAX sequence rules for a position, among the accomplished MRs
672: AND SB.rule_sequence = (SELECT MAX(SB2.rule_sequence)
673: FROM AHL_SB_POSITION_RULES SB2
674: WHERE SB2.relationship_id = SB.relationship_id
675: AND EXISTS (SELECT 'X'
676: FROM AHL_UNIT_EFFECTIVITIES_B UE
677: WHERE UE.mr_header_id = SB2.mr_header_id

Line 828: FROM AHL_SB_POSITION_RULES

824:
825: -- curosr to get the SB rules' details for a given MR header id
826: CURSOR get_rule_det_csr (c_mr_header_id NUMBER) IS
827: SELECT *
828: FROM AHL_SB_POSITION_RULES
829: WHERE mr_header_id = c_mr_header_id;
830:
831: -- curosr to get the SB rule items' details for a given rule id
832: CURSOR get_rule_items_det_csr (c_rule_id NUMBER) IS

Line 917: l_rule_id := AHL_SB_POSITION_RULES_S.NEXTVAL;

913:
914: -- 2) copy the SB rules and their items
915: FOR l_get_rule_det_csr_rec IN get_rule_det_csr(p_src_mr_header_id) LOOP
916: -- get the next value from the sequence
917: l_rule_id := AHL_SB_POSITION_RULES_S.NEXTVAL;
918:
919: -- insert the rule
920: INSERT INTO AHL_SB_POSITION_RULES(
921: rule_id, object_version_number,

Line 920: INSERT INTO AHL_SB_POSITION_RULES(

916: -- get the next value from the sequence
917: l_rule_id := AHL_SB_POSITION_RULES_S.NEXTVAL;
918:
919: -- insert the rule
920: INSERT INTO AHL_SB_POSITION_RULES(
921: rule_id, object_version_number,
922: last_update_date, last_updated_by, creation_date, created_by, last_update_login,
923: rule_name, mr_header_id,
924: mc_header_id, relationship_id,

Line 1044: FROM AHL_SB_POSITION_RULES

1040:
1041: -- cursor to get the MC header ids for the SB rules defined for a given MR
1042: CURSOR get_sb_mc_header_id_csr (c_mr_header_id NUMBER) IS
1043: SELECT DISTINCT mc_header_id
1044: FROM AHL_SB_POSITION_RULES
1045: WHERE mr_header_id = c_mr_header_id;
1046:
1047: -- cursor to get the SB rule ids for a given MC and MR
1048: CURSOR get_rule_id_csr (c_mc_header_id NUMBER,

Line 1051: FROM AHL_SB_POSITION_RULES

1047: -- cursor to get the SB rule ids for a given MC and MR
1048: CURSOR get_rule_id_csr (c_mc_header_id NUMBER,
1049: c_mr_header_id NUMBER) IS
1050: SELECT rule_id
1051: FROM AHL_SB_POSITION_RULES
1052: WHERE mc_header_id = c_mc_header_id
1053: AND mr_header_id = c_mr_header_id;
1054:
1055: --

Line 1172: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_get_rule_id_csr_rec.rule_id;

1168: -- delete the SB rule items
1169: DELETE FROM AHL_SB_RULE_ITEMS WHERE rule_id = l_get_rule_id_csr_rec.rule_id;
1170:
1171: -- delete the SB rule itself
1172: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_get_rule_id_csr_rec.rule_id;
1173:
1174: IF (l_log_statement >= l_log_current_level) THEN
1175: FND_LOG.string(l_log_statement, l_full_name, 'rule deleted = '||l_get_rule_id_csr_rec.rule_id);
1176: END IF;

Line 1265: FROM AHL_SB_POSITION_RULES

1261:
1262: -- cursor to get the SB rule ids for a given MR
1263: CURSOR get_rule_id_csr (c_mr_header_id NUMBER) IS
1264: SELECT rule_id
1265: FROM AHL_SB_POSITION_RULES
1266: WHERE mr_header_id = c_mr_header_id;
1267:
1268: --
1269: l_api_version CONSTANT NUMBER := 1.0;

Line 1331: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_rule_id_tbl(i);

1327: -- 1) Delete the SB rule items
1328: DELETE FROM AHL_SB_RULE_ITEMS WHERE rule_id = l_rule_id_tbl(i);
1329:
1330: -- 2) Delete the SB rule itself
1331: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_rule_id_tbl(i);
1332: END LOOP; -- LOOP for l_rule_id_tbl
1333: END IF; -- l_rule_id_tbl COUNT check
1334:
1335: -- Standard check of p_commit

Line 1423: FROM AHL_SB_POSITION_RULES SBR,

1419:
1420: -- curosr to get the SB rules defined for the positions affected by fork
1421: CURSOR get_rule_id_for_fork_csr (c_src_item_group_id NUMBER) IS
1422: SELECT DISTINCT SBR.rule_id
1423: FROM AHL_SB_POSITION_RULES SBR,
1424: AHL_SB_RULE_ITEMS SBI
1425: WHERE SBR.rule_id = SBI.rule_id
1426: AND SBI.item_group_id = c_src_item_group_id
1427: AND EXISTS (SELECT 'X'

Line 1436: FROM AHL_SB_POSITION_RULES

1432:
1433: -- curosr to get all the SB rules
1434: CURSOR get_rule_id_for_merge_csr IS
1435: SELECT rule_id
1436: FROM AHL_SB_POSITION_RULES
1437: WHERE TRUNC(NVL(active_start_date, SYSDATE)) <= TRUNC(SYSDATE)
1438: AND TRUNC(NVL(active_end_date, SYSDATE+1)) > TRUNC(SYSDATE);
1439:
1440: -- cursor to get the item associations' details for the given item group

Line 1560: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_rule_id_for_fork_tbl(i);

1556: FETCH chk_rule_del_OK_csr INTO l_dummy;
1557: CLOSE chk_rule_del_OK_csr;
1558: IF (l_dummy IS NULL) THEN
1559: -- delete the SB rule itself
1560: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_rule_id_for_fork_tbl(i);
1561:
1562: IF (l_log_statement >= l_log_current_level) THEN
1563: FND_LOG.string(l_log_statement, l_full_name, 'rule deleted = '||l_rule_id_for_fork_tbl(i));
1564: END IF;

Line 1629: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_rule_id_for_merge_tbl(i);

1625: FETCH chk_rule_del_OK_csr INTO l_dummy;
1626: CLOSE chk_rule_del_OK_csr;
1627: IF (l_dummy IS NULL) THEN
1628: -- delete the SB rule itself
1629: DELETE FROM AHL_SB_POSITION_RULES WHERE rule_id = l_rule_id_for_merge_tbl(i);
1630:
1631: IF (l_log_statement >= l_log_current_level) THEN
1632: FND_LOG.string(l_log_statement, l_full_name, 'rule deleted = '||l_rule_id_for_merge_tbl(i));
1633: END IF;

Line 1683: FROM AHL_SB_POSITION_RULES SB,

1679: -- cursor to get applicable SB rules for the given unit
1680: CURSOR get_appl_sb_rules_csr (c_uc_header_id NUMBER) IS
1681: SELECT SB.rule_id,
1682: SB.relationship_id
1683: FROM AHL_SB_POSITION_RULES SB,
1684: AHL_UNIT_CONFIG_HEADERS UC
1685: WHERE UC.unit_config_header_id = c_uc_header_id
1686: AND SB.mc_header_id = UC.master_config_id
1687: -- take only the rules which have MRs accomplished on the unit

Line 1695: FROM AHL_SB_POSITION_RULES SB2

1691: AND UE.csi_item_instance_id = UC.csi_item_instance_id -- SB MRs are effective on root node
1692: AND UE.accomplished_date IS NOT NULL)
1693: -- take only the MAX sequence rules for a position, among the accomplished MRs
1694: AND SB.rule_sequence = (SELECT MAX(SB2.rule_sequence)
1695: FROM AHL_SB_POSITION_RULES SB2
1696: WHERE SB2.relationship_id = SB.relationship_id
1697: AND EXISTS (SELECT 'X'
1698: FROM AHL_UNIT_EFFECTIVITIES_B UE
1699: WHERE UE.mr_header_id = SB2.mr_header_id