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')||'12:00:00 AM','dd/mm/yyyy hh:mi:ss AM'),
209: to_date(to_char(effective_end_date, 'dd/mm/yyyy')||'11:59:59 PM','dd/mm/yyyy hh:mi:ss PM'),
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 238: delete from hz_hierarchy_nodes

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

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

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

Line 274: HZ_HIERARCHY_NODES_PKG.Insert_Row(

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

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

454: l_line_number := 19;
455:
456: -- Debug info.
457: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
458: hz_utility_v2pub.debug(p_message=> 'HZ_HIERARCHY_NODES_PKG.insert_row (+) l_tp = '||l_tp||' l_lc = '||l_lc,
459: p_prefix=>l_debug_prefix,
460: p_msg_level=>fnd_log.level_procedure);
461: END IF;
462:

Line 464: HZ_HIERARCHY_NODES_PKG.Insert_Row(

460: p_msg_level=>fnd_log.level_procedure);
461: END IF;
462:
463:
464: HZ_HIERARCHY_NODES_PKG.Insert_Row(
465: X_ROWID => l_rowid,
466: X_HIERARCHY_TYPE => p_hierarchy_type,
467: X_PARENT_ID => p_node_id,
468: X_PARENT_TABLE_NAME => p_table_name,

Line 577: FROM HZ_HIERARCHY_NODES

573: TOP_PARENT_FLAG,
574: EFFECTIVE_START_DATE,
575: EFFECTIVE_END_DATE
576: */
577: FROM HZ_HIERARCHY_NODES
578: WHERE CHILD_ID = p_hierarchy_node_rec.parent_id
579: AND CHILD_TABLE_NAME = p_hierarchy_node_rec.parent_table_name
580: AND CHILD_OBJECT_TYPE = p_hierarchy_node_rec.parent_object_type
581: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 610: FROM HZ_HIERARCHY_NODES

606: LEAF_CHILD_FLAG,
607: EFFECTIVE_START_DATE,
608: EFFECTIVE_END_DATE
609: */
610: FROM HZ_HIERARCHY_NODES
611: WHERE PARENT_ID = p_hierarchy_node_rec.child_id
612: AND PARENT_TABLE_NAME = p_hierarchy_node_rec.child_table_name
613: AND PARENT_OBJECT_TYPE = p_hierarchy_node_rec.child_object_type
614: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 638: FROM HZ_HIERARCHY_NODES a

634: PARENT_TABLE_NAME,
635: PARENT_OBJECT_TYPE,
636: EFFECTIVE_START_DATE,
637: EFFECTIVE_END_DATE
638: FROM HZ_HIERARCHY_NODES a
639: WHERE CHILD_ID = p_child_id
640: AND CHILD_TABLE_NAME = p_child_table_name
641: AND CHILD_OBJECT_TYPE = p_child_object_type
642: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

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

651: AND NVL(status,'A') = 'A'
652: AND LEVEL_NUMBER = 1
653: -- Fix for Bug 5662272
654: -- Filter out end dated records, if there is a future record existing
655: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b
656: WHERE b.PARENT_ID = a.PARENT_ID
657: AND b.PARENT_TABLE_NAME = a.PARENT_TABLE_NAME
658: AND b.PARENT_OBJECT_TYPE = a.PARENT_OBJECT_TYPE
659: AND b.CHILD_ID = a.CHILD_ID

Line 682: FROM HZ_HIERARCHY_NODES a

678: TOP_PARENT_FLAG,
679: LEAF_CHILD_FLAG,
680: EFFECTIVE_START_DATE,
681: EFFECTIVE_END_DATE
682: FROM HZ_HIERARCHY_NODES a
683: WHERE PARENT_ID = p_parent_id
684: AND PARENT_TABLE_NAME = p_parent_table_name
685: AND PARENT_OBJECT_TYPE = p_parent_object_type
686: AND CHILD_ID = p_child_id

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

697: AND NVL(status,'A') = 'A'
698: -- Fix for Bug 5662272
699: -- For the same level, if there are 2 records, then take the latest one and filter out
700: -- record with lower end date. That record may have been end dated and a new one is created
701: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b
702: WHERE b.PARENT_ID = a.PARENT_ID
703: AND b.PARENT_TABLE_NAME = a.PARENT_TABLE_NAME
704: AND b.PARENT_OBJECT_TYPE = a.PARENT_OBJECT_TYPE
705: AND b.CHILD_ID = a.CHILD_ID

Line 744: HZ_HIERARCHY_NODES_PKG.Insert_Row(

740: -- Insert the direct link between AAA->BBB.
741: -- Since no duplicate record will be sent to this API, there is no need to check for the
742: -- existance of a record with same parent/child, even if there is one, it will have a
743: -- different period of time.
744: HZ_HIERARCHY_NODES_PKG.Insert_Row(
745: X_ROWID => l_direct_link_rowid,
746: X_HIERARCHY_TYPE => p_hierarchy_node_rec.hierarchy_type,
747: X_PARENT_ID => p_hierarchy_node_rec.parent_id,
748: X_PARENT_TABLE_NAME => p_hierarchy_node_rec.parent_table_name,

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

817: -- in to the cursor only if there is some overlap between the old and new dates.
818: -- If the old and new date ranges are mutually exclusive, then the where
819: -- used for the cursors will prevent any data from being picked up.
820: -- Also the relationship API will not pass the existing dates.
821: -- these are picked up from the HZ_HIERARCHY_NODES table itself,
822: -- from the level 1 recordusing the parent_id, child_i and relationship_id
823: -- passed through the p_hierarchy_node_rec.
824: -- once obtained, these current dates will be used to pickup data in to the cursors.
825:

Line 830: FROM HZ_HIERARCHY_NODES

826: -- fetch existing effective start and end dates for relationship id
827: BEGIN
828: SELECT EFFECTIVE_START_DATE, EFFECTIVE_END_DATE
829: INTO l_existing_start_date, l_existing_end_date
830: FROM HZ_HIERARCHY_NODES
831: WHERE PARENT_ID = p_hierarchy_node_rec.parent_id
832: AND CHILD_ID = p_hierarchy_node_rec.child_id
833: AND LEVEL_NUMBER = 1
834: AND RELATIONSHIP_ID = p_hierarchy_node_rec.relationship_id ;

Line 916: HZ_HIERARCHY_NODES_PKG.Insert_Row(

912: -- l_top_parent_flag := r_get_all_parents.top_parent_flag;
913:
914: IF l_level_number > 1 THEN
915: -- now insert the XXX->YYY link
916: HZ_HIERARCHY_NODES_PKG.Insert_Row(
917: X_ROWID => l_rowid,
918: X_HIERARCHY_TYPE => p_hierarchy_node_rec.hierarchy_type,
919: X_PARENT_ID => r_get_all_parents.parent_id,
920: X_PARENT_TABLE_NAME => r_get_all_parents.parent_table_name,

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

990: -- in to the cursor only if there is some overlap between the old and new dates.
991: -- If the old and new date ranges are mutually exclusive, then the where
992: -- used for the cursors will prevent any data from being picked up.
993: -- Also the relationship API will not pass the existing dates.
994: -- these are picked up from the HZ_HIERARCHY_NODES table itself,
995: -- from the level 1 recordusing the parent_id, child_i and relationship_id
996: -- passed through the p_hierarchy_node_rec.
997: -- once obtained, these current dates will be used to pickup data in to the cursors.
998: l_existing_start_date DATE;

Line 1021: FROM HZ_HIERARCHY_NODES

1017: IS
1018: SELECT CHILD_ID,
1019: CHILD_OBJECT_TYPE,
1020: CHILD_TABLE_NAME
1021: FROM HZ_HIERARCHY_NODES
1022: WHERE PARENT_ID = ll_child_id
1023: AND PARENT_TABLE_NAME = ll_child_table
1024: AND PARENT_OBJECT_TYPE = ll_child_object_type
1025: AND HIERARCHY_TYPE = l_hierarchy_type

Line 1043: FROM HZ_HIERARCHY_NODES a

1039: l_child_id IN NUMBER, l_child_object_type IN VARCHAR2,
1040: l_child_table IN VARCHAR2)
1041: IS
1042: SELECT PARENT_ID, PARENT_OBJECT_TYPE, CHILD_ID, CHILD_OBJECT_TYPE, rowid
1043: FROM HZ_HIERARCHY_NODES a
1044: WHERE PARENT_ID = l_parent_id
1045: AND PARENT_TABLE_NAME = l_parent_table
1046: AND PARENT_OBJECT_TYPE = l_parent_object_type
1047: AND CHILD_ID = l_child_id

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

1063: -- Change it pick up the records for which start date and end date for level 1 relationship
1064: -- matches (most likely that will be the date for this link also.). If No such record
1065: -- exists, then pick up the greatest effective_end_date rec (most linkely will be the active one)
1066: -- and execute cursor only once
1067: AND NOT EXISTS (SELECT NULL FROM HZ_HIERARCHY_NODES b
1068: WHERE b.PARENT_ID = a.PARENT_ID
1069: AND b.PARENT_TABLE_NAME = a.PARENT_TABLE_NAME
1070: AND b.PARENT_OBJECT_TYPE = a.PARENT_OBJECT_TYPE
1071: AND b.CHILD_ID = a.CHILD_ID

Line 1095: FROM hz_hierarchy_nodes

1091:
1092: CURSOR get_parent_id_cur (l_child_id IN NUMBER, l_child_object_type IN VARCHAR2,
1093: l_child_table IN VARCHAR2) IS
1094: SELECT parent_id, parent_object_type, parent_table_name
1095: FROM hz_hierarchy_nodes
1096: WHERE hierarchy_type = l_hierarchy_type
1097: AND child_table_name = l_child_table
1098: AND child_object_type = l_child_object_type
1099: AND child_id = l_child_id

Line 1237: FROM HZ_HIERARCHY_NODES

1233: -- fetch existing effective start and end dates for relationship id
1234: BEGIN
1235: SELECT EFFECTIVE_START_DATE,EFFECTIVE_END_DATE
1236: INTO l_existing_start_date,l_existing_end_date
1237: FROM HZ_HIERARCHY_NODES
1238: WHERE PARENT_ID = p_hierarchy_node_rec.parent_id
1239: AND CHILD_ID = p_hierarchy_node_rec.child_id
1240: AND LEVEL_NUMBER = 1
1241: AND RELATIONSHIP_ID = p_hierarchy_node_rec.relationship_id ;

Line 1295: UPDATE HZ_HIERARCHY_NODES

1291: /* dbms_output.put_line(c_par_child_rec.parent_id||':'||c_par_child_rec.parent_object_type||':'||
1292: c_par_child_rec.child_id||':'||c_par_child_rec.child_object_type||':'||
1293: c_par_child_rec.rowid);
1294: */
1295: UPDATE HZ_HIERARCHY_NODES
1296: SET EFFECTIVE_START_DATE = NVL(p_hierarchy_node_rec.effective_start_date, EFFECTIVE_START_DATE),
1297: EFFECTIVE_END_DATE = NVL(p_hierarchy_node_rec.effective_end_date, EFFECTIVE_END_DATE),
1298: -- added for Bug 5662272 (This will update Status values for I which help in
1299: -- eleminating deleted rows from all the cursors

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

1363: -- in to the cursor only if there is some overlap between the old and new dates.
1364: -- If the old and new date ranges are mutually exclusive, then the where
1365: -- used for the cursors will prevent any data from being picked up.
1366: -- Also the relationship API will not pass the existing dates.
1367: -- these are picked up from the HZ_HIERARCHY_NODES table itself,
1368: -- from the level 1 recordusing the parent_id, child_i and relationship_id
1369: -- passed through the p_hierarchy_node_rec.
1370: -- once obtained, these current dates will be used to pickup data in to the cursors.
1371: l_existing_start_date DATE;

Line 1385: FROM HZ_HIERARCHY_NODES

1381: LEVEL_NUMBER,
1382: TOP_PARENT_FLAG,
1383: EFFECTIVE_START_DATE,
1384: EFFECTIVE_END_DATE
1385: FROM HZ_HIERARCHY_NODES
1386: WHERE CHILD_ID = p_hierarchy_node_rec.parent_id
1387: AND CHILD_TABLE_NAME = p_hierarchy_node_rec.parent_table_name
1388: AND CHILD_OBJECT_TYPE = p_hierarchy_node_rec.parent_object_type
1389: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 1415: FROM HZ_HIERARCHY_NODES

1411: LEVEL_NUMBER,
1412: LEAF_CHILD_FLAG,
1413: EFFECTIVE_START_DATE,
1414: EFFECTIVE_END_DATE
1415: FROM HZ_HIERARCHY_NODES
1416: WHERE PARENT_ID = p_hierarchy_node_rec.child_id
1417: AND PARENT_TABLE_NAME = p_hierarchy_node_rec.child_table_name
1418: AND PARENT_OBJECT_TYPE = p_hierarchy_node_rec.child_object_type
1419: AND HIERARCHY_TYPE = p_hierarchy_node_rec.hierarchy_type

Line 1444: from HZ_HIERARCHY_NODES

1440: /* -- Moved below logic into procedure do_update_link_pvt for Bug 4662744 (Nishant 30-Mar-2006)
1441: -- End dating of hierarchy in case of multiple parents was not correct
1442:
1443: Select EFFECTIVE_START_DATE,EFFECTIVE_END_DATE into l_existing_start_date,l_existing_end_date
1444: from HZ_HIERARCHY_NODES
1445: where PARENT_ID=p_hierarchy_node_rec.parent_id
1446: AND CHILD_ID=p_hierarchy_node_rec.child_id
1447: AND LEVEL_NUMBER=1
1448: AND RELATIONSHIP_ID=p_hierarchy_node_rec.relationship_id ;

Line 1471: UPDATE HZ_HIERARCHY_NODES

1467:
1468: WHILE c_get_all_children%FOUND
1469: -- let's call it YYY
1470: LOOP
1471: UPDATE HZ_HIERARCHY_NODES
1472: SET EFFECTIVE_START_DATE = NVL(p_hierarchy_node_rec.effective_start_date, EFFECTIVE_START_DATE),
1473: EFFECTIVE_END_DATE = NVL(p_hierarchy_node_rec.effective_end_date, EFFECTIVE_END_DATE),
1474: LAST_UPDATED_BY = HZ_UTILITY_V2PUB.last_updated_by,
1475: LAST_UPDATE_DATE = HZ_UTILITY_V2PUB.last_update_date,