DBA Data[Home] [Help]

APPS.HZ_HIERARCHY_PUB dependencies on HZ_HIERARCHY_NODES

Line 192: from hz_hierarchy_nodes

188: -- Bug 7260677
189: /*
190: cursor c_dates(p_id number,p_table_name varchar2,p_object_type varchar2,p_hierarchy_type varchar2) is
191: select effective_start_date,effective_end_date,'P' parent_child_flag
192: from hz_hierarchy_nodes
193: where parent_id=p_id
194: and parent_table_name=p_table_name
195: and parent_object_type=p_object_type
196: and hierarchy_type=p_hierarchy_type

Line 200: from hz_hierarchy_nodes

196: and hierarchy_type=p_hierarchy_type
197: and level_number=1
198: union
199: select effective_start_date,effective_end_date,'C' parent_child_flag
200: from hz_hierarchy_nodes
201: where child_id=p_id
202: and child_table_name=p_table_name
203: and child_object_type=p_object_type
204: and hierarchy_type=p_hierarchy_type

Line 211: from hz_hierarchy_nodes

207: cursor c_dates(p_id number,p_table_name varchar2,p_object_type varchar2,p_hierarchy_type varchar2) is
208: select to_date(to_char(effective_start_date,'dd/mm/yyyy')||'00:00:00','dd/mm/yyyy hh24:mi:ss'),
209: to_date(to_char(effective_end_date, 'dd/mm/yyyy')||'23:59:59','dd/mm/yyyy hh24:mi:ss'),
210: 'P' parent_child_flag
211: from hz_hierarchy_nodes
212: where parent_id=p_id
213: and parent_table_name=p_table_name
214: and parent_object_type=p_object_type
215: and hierarchy_type=p_hierarchy_type

Line 221: from hz_hierarchy_nodes

217: union
218: select to_date(to_char(effective_start_date,'dd/mm/yyyy')||'00:00:00','dd/mm/yyyy hh24:mi:ss'),
219: to_date(to_char(effective_end_date, 'dd/mm/yyyy')||'23:59:59','dd/mm/yyyy hh24:mi:ss'),
220: 'C' parent_child_flag
221: from hz_hierarchy_nodes
222: where child_id=p_id
223: and child_table_name=p_table_name
224: and child_object_type=p_object_type
225: and hierarchy_type=p_hierarchy_type

Line 240: delete from hz_hierarchy_nodes

236: p_msg_level=>fnd_log.level_procedure);
237: END IF;
238:
239:
240: delete from hz_hierarchy_nodes
241: where parent_id=p_node_id
242: and parent_table_name=p_table_name
243: and parent_object_type=p_object_type
244: and hierarchy_type=p_hierarchy_type

Line 271: hz_utility_v2pub.debug(p_message=>'HZ_HIERARCHY_NODES_PKG.insert_row (+) l_tp = '||l_tp||' l_lc = '||l_lc ,

267: end if;
268:
269: -- Debug info.
270: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
271: hz_utility_v2pub.debug(p_message=>'HZ_HIERARCHY_NODES_PKG.insert_row (+) l_tp = '||l_tp||' l_lc = '||l_lc ,
272: p_prefix=>l_debug_prefix,
273: p_msg_level=>fnd_log.level_procedure);
274: END IF;
275:

Line 276: HZ_HIERARCHY_NODES_PKG.Insert_Row(

272: p_prefix=>l_debug_prefix,
273: p_msg_level=>fnd_log.level_procedure);
274: END IF;
275:
276: HZ_HIERARCHY_NODES_PKG.Insert_Row(
277: X_ROWID => l_rowid,
278: X_HIERARCHY_TYPE => p_hierarchy_type,
279: X_PARENT_ID => p_node_id,
280: X_PARENT_TABLE_NAME => p_table_name,

Line 480: hz_utility_v2pub.debug(p_message=> 'HZ_HIERARCHY_NODES_PKG.insert_row (+) l_tp = '||l_tp||' l_lc = '||l_lc,

476: l_line_number := 19;
477:
478: -- Debug info.
479: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
480: hz_utility_v2pub.debug(p_message=> 'HZ_HIERARCHY_NODES_PKG.insert_row (+) l_tp = '||l_tp||' l_lc = '||l_lc,
481: p_prefix=>l_debug_prefix,
482: p_msg_level=>fnd_log.level_procedure);
483: END IF;
484:

Line 486: HZ_HIERARCHY_NODES_PKG.Insert_Row(

482: p_msg_level=>fnd_log.level_procedure);
483: END IF;
484:
485:
486: HZ_HIERARCHY_NODES_PKG.Insert_Row(
487: X_ROWID => l_rowid,
488: X_HIERARCHY_TYPE => p_hierarchy_type,
489: X_PARENT_ID => p_node_id,
490: X_PARENT_TABLE_NAME => p_table_name,

Line 599: FROM HZ_HIERARCHY_NODES

595: TOP_PARENT_FLAG,
596: EFFECTIVE_START_DATE,
597: EFFECTIVE_END_DATE
598: */
599: FROM HZ_HIERARCHY_NODES
600: WHERE CHILD_ID = p_hierarchy_node_rec.parent_id
601: AND CHILD_TABLE_NAME = p_hierarchy_node_rec.parent_table_name
602: AND CHILD_OBJECT_TYPE = p_hierarchy_node_rec.parent_object_type
603: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 632: FROM HZ_HIERARCHY_NODES

628: LEAF_CHILD_FLAG,
629: EFFECTIVE_START_DATE,
630: EFFECTIVE_END_DATE
631: */
632: FROM HZ_HIERARCHY_NODES
633: WHERE PARENT_ID = p_hierarchy_node_rec.child_id
634: AND PARENT_TABLE_NAME = p_hierarchy_node_rec.child_table_name
635: AND PARENT_OBJECT_TYPE = p_hierarchy_node_rec.child_object_type
636: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 660: FROM HZ_HIERARCHY_NODES a

656: PARENT_TABLE_NAME,
657: PARENT_OBJECT_TYPE,
658: EFFECTIVE_START_DATE,
659: EFFECTIVE_END_DATE
660: FROM HZ_HIERARCHY_NODES a
661: WHERE CHILD_ID = p_child_id
662: AND CHILD_TABLE_NAME = p_child_table_name
663: AND CHILD_OBJECT_TYPE = p_child_object_type
664: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 677: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b

673: AND NVL(status,'A') = 'A'
674: AND LEVEL_NUMBER = 1
675: -- Fix for Bug 5662272
676: -- Filter out end dated records, if there is a future record existing
677: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b
678: WHERE b.PARENT_ID = a.PARENT_ID
679: AND b.PARENT_TABLE_NAME = a.PARENT_TABLE_NAME
680: AND b.PARENT_OBJECT_TYPE = a.PARENT_OBJECT_TYPE
681: AND b.CHILD_ID = a.CHILD_ID

Line 704: FROM HZ_HIERARCHY_NODES a

700: TOP_PARENT_FLAG,
701: LEAF_CHILD_FLAG,
702: EFFECTIVE_START_DATE,
703: EFFECTIVE_END_DATE
704: FROM HZ_HIERARCHY_NODES a
705: WHERE PARENT_ID = p_parent_id
706: AND PARENT_TABLE_NAME = p_parent_table_name
707: AND PARENT_OBJECT_TYPE = p_parent_object_type
708: AND CHILD_ID = p_child_id

Line 723: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b

719: AND NVL(status,'A') = 'A'
720: -- Fix for Bug 5662272
721: -- For the same level, if there are 2 records, then take the latest one and filter out
722: -- record with lower end date. That record may have been end dated and a new one is created
723: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b
724: WHERE b.PARENT_ID = a.PARENT_ID
725: AND b.PARENT_TABLE_NAME = a.PARENT_TABLE_NAME
726: AND b.PARENT_OBJECT_TYPE = a.PARENT_OBJECT_TYPE
727: AND b.CHILD_ID = a.CHILD_ID

Line 766: HZ_HIERARCHY_NODES_PKG.Insert_Row(

762: -- Insert the direct link between AAA->BBB.
763: -- Since no duplicate record will be sent to this API, there is no need to check for the
764: -- existance of a record with same parent/child, even if there is one, it will have a
765: -- different period of time.
766: HZ_HIERARCHY_NODES_PKG.Insert_Row(
767: X_ROWID => l_direct_link_rowid,
768: X_HIERARCHY_TYPE => p_hierarchy_node_rec.hierarchy_type,
769: X_PARENT_ID => p_hierarchy_node_rec.parent_id,
770: X_PARENT_TABLE_NAME => p_hierarchy_node_rec.parent_table_name,

Line 843: -- these are picked up from the HZ_HIERARCHY_NODES table itself,

839: -- in to the cursor only if there is some overlap between the old and new dates.
840: -- If the old and new date ranges are mutually exclusive, then the where
841: -- used for the cursors will prevent any data from being picked up.
842: -- Also the relationship API will not pass the existing dates.
843: -- these are picked up from the HZ_HIERARCHY_NODES table itself,
844: -- from the level 1 recordusing the parent_id, child_i and relationship_id
845: -- passed through the p_hierarchy_node_rec.
846: -- once obtained, these current dates will be used to pickup data in to the cursors.
847:

Line 852: FROM HZ_HIERARCHY_NODES

848: -- fetch existing effective start and end dates for relationship id
849: BEGIN
850: SELECT EFFECTIVE_START_DATE, EFFECTIVE_END_DATE
851: INTO l_existing_start_date, l_existing_end_date
852: FROM HZ_HIERARCHY_NODES
853: WHERE PARENT_ID = p_hierarchy_node_rec.parent_id
854: AND CHILD_ID = p_hierarchy_node_rec.child_id
855: AND LEVEL_NUMBER = 1
856: AND RELATIONSHIP_ID = p_hierarchy_node_rec.relationship_id ;

Line 940: HZ_HIERARCHY_NODES_PKG.Insert_Row(

936: -- X_STATUS value changed from NULL to l_status to insert row along with
937: -- actual relationship status.
938: IF l_level_number > 1 THEN
939: -- now insert the XXX->YYY link
940: HZ_HIERARCHY_NODES_PKG.Insert_Row(
941: X_ROWID => l_rowid,
942: X_HIERARCHY_TYPE => p_hierarchy_node_rec.hierarchy_type,
943: X_PARENT_ID => r_get_all_parents.parent_id,
944: X_PARENT_TABLE_NAME => r_get_all_parents.parent_table_name,

Line 1018: -- these are picked up from the HZ_HIERARCHY_NODES table itself,

1014: -- in to the cursor only if there is some overlap between the old and new dates.
1015: -- If the old and new date ranges are mutually exclusive, then the where
1016: -- used for the cursors will prevent any data from being picked up.
1017: -- Also the relationship API will not pass the existing dates.
1018: -- these are picked up from the HZ_HIERARCHY_NODES table itself,
1019: -- from the level 1 recordusing the parent_id, child_i and relationship_id
1020: -- passed through the p_hierarchy_node_rec.
1021: -- once obtained, these current dates will be used to pickup data in to the cursors.
1022: l_existing_start_date DATE;

Line 1045: FROM HZ_HIERARCHY_NODES

1041: IS
1042: SELECT CHILD_ID,
1043: CHILD_OBJECT_TYPE,
1044: CHILD_TABLE_NAME
1045: FROM HZ_HIERARCHY_NODES
1046: WHERE PARENT_ID = ll_child_id
1047: AND PARENT_TABLE_NAME = ll_child_table
1048: AND PARENT_OBJECT_TYPE = ll_child_object_type
1049: AND HIERARCHY_TYPE = l_hierarchy_type

Line 1067: FROM HZ_HIERARCHY_NODES a

1063: l_child_id IN NUMBER, l_child_object_type IN VARCHAR2,
1064: l_child_table IN VARCHAR2)
1065: IS
1066: SELECT PARENT_ID, PARENT_OBJECT_TYPE, CHILD_ID, CHILD_OBJECT_TYPE, rowid
1067: FROM HZ_HIERARCHY_NODES a
1068: WHERE PARENT_ID = l_parent_id
1069: AND PARENT_TABLE_NAME = l_parent_table
1070: AND PARENT_OBJECT_TYPE = l_parent_object_type
1071: AND CHILD_ID = l_child_id

Line 1091: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b

1087: -- Change it pick up the records for which start date and end date for level 1 relationship
1088: -- matches (most likely that will be the date for this link also.). If No such record
1089: -- exists, then pick up the greatest effective_end_date rec (most linkely will be the active one)
1090: -- and execute cursor only once
1091: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b
1092: WHERE b.PARENT_ID = a.PARENT_ID
1093: AND b.PARENT_TABLE_NAME = a.PARENT_TABLE_NAME
1094: AND b.PARENT_OBJECT_TYPE = a.PARENT_OBJECT_TYPE
1095: AND b.CHILD_ID = a.CHILD_ID

Line 1119: FROM hz_hierarchy_nodes

1115:
1116: CURSOR get_parent_id_cur (l_child_id IN NUMBER, l_child_object_type IN VARCHAR2,
1117: l_child_table IN VARCHAR2) IS
1118: SELECT parent_id, parent_object_type, parent_table_name
1119: FROM hz_hierarchy_nodes
1120: WHERE hierarchy_type = l_hierarchy_type
1121: AND child_table_name = l_child_table
1122: AND child_object_type = l_child_object_type
1123: AND child_id = l_child_id

Line 1261: FROM HZ_HIERARCHY_NODES

1257: -- fetch existing effective start and end dates for relationship id
1258: BEGIN
1259: SELECT EFFECTIVE_START_DATE,EFFECTIVE_END_DATE
1260: INTO l_existing_start_date,l_existing_end_date
1261: FROM HZ_HIERARCHY_NODES
1262: WHERE PARENT_ID = p_hierarchy_node_rec.parent_id
1263: AND CHILD_ID = p_hierarchy_node_rec.child_id
1264: AND LEVEL_NUMBER = 1
1265: AND RELATIONSHIP_ID = p_hierarchy_node_rec.relationship_id ;

Line 1319: UPDATE HZ_HIERARCHY_NODES

1315: /* dbms_output.put_line(c_par_child_rec.parent_id||':'||c_par_child_rec.parent_object_type||':'||
1316: c_par_child_rec.child_id||':'||c_par_child_rec.child_object_type||':'||
1317: c_par_child_rec.rowid);
1318: */
1319: UPDATE HZ_HIERARCHY_NODES
1320: SET EFFECTIVE_START_DATE = NVL(p_hierarchy_node_rec.effective_start_date, EFFECTIVE_START_DATE),
1321: EFFECTIVE_END_DATE = NVL(p_hierarchy_node_rec.effective_end_date, EFFECTIVE_END_DATE),
1322: -- added for Bug 5662272 (This will update Status values for I which help in
1323: -- eleminating deleted rows from all the cursors

Line 1391: -- these are picked up from the HZ_HIERARCHY_NODES table itself,

1387: -- in to the cursor only if there is some overlap between the old and new dates.
1388: -- If the old and new date ranges are mutually exclusive, then the where
1389: -- used for the cursors will prevent any data from being picked up.
1390: -- Also the relationship API will not pass the existing dates.
1391: -- these are picked up from the HZ_HIERARCHY_NODES table itself,
1392: -- from the level 1 recordusing the parent_id, child_i and relationship_id
1393: -- passed through the p_hierarchy_node_rec.
1394: -- once obtained, these current dates will be used to pickup data in to the cursors.
1395: l_existing_start_date DATE;

Line 1409: FROM HZ_HIERARCHY_NODES

1405: LEVEL_NUMBER,
1406: TOP_PARENT_FLAG,
1407: EFFECTIVE_START_DATE,
1408: EFFECTIVE_END_DATE
1409: FROM HZ_HIERARCHY_NODES
1410: WHERE CHILD_ID = p_hierarchy_node_rec.parent_id
1411: AND CHILD_TABLE_NAME = p_hierarchy_node_rec.parent_table_name
1412: AND CHILD_OBJECT_TYPE = p_hierarchy_node_rec.parent_object_type
1413: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 1439: FROM HZ_HIERARCHY_NODES

1435: LEVEL_NUMBER,
1436: LEAF_CHILD_FLAG,
1437: EFFECTIVE_START_DATE,
1438: EFFECTIVE_END_DATE
1439: FROM HZ_HIERARCHY_NODES
1440: WHERE PARENT_ID = p_hierarchy_node_rec.child_id
1441: AND PARENT_TABLE_NAME = p_hierarchy_node_rec.child_table_name
1442: AND PARENT_OBJECT_TYPE = p_hierarchy_node_rec.child_object_type
1443: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 1468: from HZ_HIERARCHY_NODES

1464: /* -- Moved below logic into procedure do_update_link_pvt for Bug 4662744 (Nishant 30-Mar-2006)
1465: -- End dating of hierarchy in case of multiple parents was not correct
1466:
1467: Select EFFECTIVE_START_DATE,EFFECTIVE_END_DATE into l_existing_start_date,l_existing_end_date
1468: from HZ_HIERARCHY_NODES
1469: where PARENT_ID=p_hierarchy_node_rec.parent_id
1470: AND CHILD_ID=p_hierarchy_node_rec.child_id
1471: AND LEVEL_NUMBER=1
1472: AND RELATIONSHIP_ID=p_hierarchy_node_rec.relationship_id ;

Line 1495: UPDATE HZ_HIERARCHY_NODES

1491:
1492: WHILE c_get_all_children%FOUND
1493: -- let's call it YYY
1494: LOOP
1495: UPDATE HZ_HIERARCHY_NODES
1496: SET EFFECTIVE_START_DATE = NVL(p_hierarchy_node_rec.effective_start_date, EFFECTIVE_START_DATE),
1497: EFFECTIVE_END_DATE = NVL(p_hierarchy_node_rec.effective_end_date, EFFECTIVE_END_DATE),
1498: LAST_UPDATED_BY = HZ_UTILITY_V2PUB.last_updated_by,
1499: LAST_UPDATE_DATE = HZ_UTILITY_V2PUB.last_update_date,