89: l_push_lookup := EDW_COLLECTION_UTIL.get_lookup_value(
90: 'EDW_LEVEL_LOOKUP', l_push_from_level);
91: /* Write warning message if lookup doesn't exist */
92: IF (l_push_lookup IS NULL) THEN
93: edw_log.put_line('**Warning**: No Lookup Code Found in GET_LOOKUP_VALUE');
94: edw_log.put_line('when Pushing Tree ' || p_tree_number || ' Level '
95: || p_from_level);
96: END IF;
97: END IF;
90: 'EDW_LEVEL_LOOKUP', l_push_from_level);
91: /* Write warning message if lookup doesn't exist */
92: IF (l_push_lookup IS NULL) THEN
93: edw_log.put_line('**Warning**: No Lookup Code Found in GET_LOOKUP_VALUE');
94: edw_log.put_line('when Pushing Tree ' || p_tree_number || ' Level '
95: || p_from_level);
96: END IF;
97: END IF;
98:
183: and NAME is not null';
184:
185: END IF;
186:
187: edw_log.put_line( 'Pushing Tree ' || p_tree_number || ' Level ' ||
188: p_from_level || ' to Level ' || p_to_level );
189:
190: l_temp_date := SYSDATE;
191: EXECUTE IMMEDIATE l_sql_stmt USING p_from_date, p_to_date;
191: EXECUTE IMMEDIATE l_sql_stmt USING p_from_date, p_to_date;
192: l_duration := sysdate - l_temp_date;
193:
194: l_rows_inserted := sql%rowcount;
195: edw_log.put_line('Inserted '||to_char(nvl(sql%rowcount,0))||
196: ' rows into the ' || l_to_table || ' staging table');
197:
198: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
199: edw_log.put_line(' ');
194: l_rows_inserted := sql%rowcount;
195: edw_log.put_line('Inserted '||to_char(nvl(sql%rowcount,0))||
196: ' rows into the ' || l_to_table || ' staging table');
197:
198: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
199: edw_log.put_line(' ');
200:
201: End Do_Insert;
202:
195: edw_log.put_line('Inserted '||to_char(nvl(sql%rowcount,0))||
196: ' rows into the ' || l_to_table || ' staging table');
197:
198: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
199: edw_log.put_line(' ');
200:
201: End Do_Insert;
202:
203: Procedure Push_INT_ORGANIZATION(
230: -- -----------------------------------------------------------------------------
231: -- Start of Collection , Developer Customizable Section
232: -- -----------------------------------------------------------------------------
233:
234: edw_log.put_line(' ');
235: edw_log.put_line('Pushing bottom-level orgs');
236:
237: l_temp_date := sysdate;
238:
231: -- Start of Collection , Developer Customizable Section
232: -- -----------------------------------------------------------------------------
233:
234: edw_log.put_line(' ');
235: edw_log.put_line('Pushing bottom-level orgs');
236:
237: l_temp_date := sysdate;
238:
239: Insert Into EDW_ORGA_ORG_LSTG@EDW_APPS_TO_WH(
337:
338: l_rows_inserted := nvl(sql%rowcount,0);
339: l_duration := sysdate - l_temp_date;
340:
341: edw_log.put_line('Inserted ' || to_char(l_rows_inserted) ||
342: ' rows into the EDW_ORGA_ORG_LSTG staging table');
343: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
344: edw_log.put_line(' ');
345:
339: l_duration := sysdate - l_temp_date;
340:
341: edw_log.put_line('Inserted ' || to_char(l_rows_inserted) ||
342: ' rows into the EDW_ORGA_ORG_LSTG staging table');
343: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
344: edw_log.put_line(' ');
345:
346: EDW_ORGANIZATION_M_C.g_row_count := EDW_ORGANIZATION_M_C.g_row_count +
347: l_rows_inserted;
340:
341: edw_log.put_line('Inserted ' || to_char(l_rows_inserted) ||
342: ' rows into the EDW_ORGA_ORG_LSTG staging table');
343: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
344: edw_log.put_line(' ');
345:
346: EDW_ORGANIZATION_M_C.g_row_count := EDW_ORGANIZATION_M_C.g_row_count +
347: l_rows_inserted;
348:
394: -- -----------------------------------------------------------------------------
395: -- Start of Collection , Developer Customizable Section
396: -- -----------------------------------------------------------------------------
397:
398: edw_log.put_line(' ');
399: edw_log.put_line('Pushing Operating Units');
400:
401: l_temp_date := sysdate;
402:
395: -- Start of Collection , Developer Customizable Section
396: -- -----------------------------------------------------------------------------
397:
398: edw_log.put_line(' ');
399: edw_log.put_line('Pushing Operating Units');
400:
401: l_temp_date := sysdate;
402:
403: Insert Into EDW_ORGA_OPER_UNIT_LSTG@EDW_APPS_TO_WH(
463:
464: l_rows_inserted := nvl(sql%rowcount,0);
465: l_duration := sysdate - l_temp_date;
466:
467: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
468: ' rows into the EDW_ORGA_OPER_UNIT_LSTG staging table');
469: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
470: edw_log.put_line(' ');
471:
465: l_duration := sysdate - l_temp_date;
466:
467: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
468: ' rows into the EDW_ORGA_OPER_UNIT_LSTG staging table');
469: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
470: edw_log.put_line(' ');
471:
472:
473: -- Start of change by S.Bhattal, 11-OCT-2000
466:
467: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
468: ' rows into the EDW_ORGA_OPER_UNIT_LSTG staging table');
469: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
470: edw_log.put_line(' ');
471:
472:
473: -- Start of change by S.Bhattal, 11-OCT-2000
474:
478: l_tmp_str2 := EDW_COLLECTION_UTIL.get_lookup_value(
479: 'EDW_LEVEL_LOOKUP', 'ORG_LEGAL_ENTITY' );
480:
481: if (l_tmp_str1 is null) or (l_tmp_str2 is null) THEN
482: edw_log.put_line('***Warning*** : No Lookup Code Found in GET_LOOKUP_VALUE when Pushing Operating Unit');
483: end if;
484:
485: -- End of change by S.Bhattal, 11-OCT-2000
486:
483: end if;
484:
485: -- End of change by S.Bhattal, 11-OCT-2000
486:
487: edw_log.put_line( 'Pushing Business Groups to Operating Unit level' );
488:
489: Insert Into EDW_ORGA_OPER_UNIT_LSTG@EDW_APPS_TO_WH(
490: BUSINESS_GROUP,
491: DATE_FROM,
549:
550: l_rows_inserted := nvl(sql%rowcount,0);
551: l_duration := sysdate - l_temp_date;
552:
553: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
554: ' rows into the EDW_ORGA_BUSINESS_GROUP_LSTG staging table');
555: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
556: edw_log.put_line(' ');
557:
551: l_duration := sysdate - l_temp_date;
552:
553: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
554: ' rows into the EDW_ORGA_BUSINESS_GROUP_LSTG staging table');
555: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
556: edw_log.put_line(' ');
557:
558: -- ---------------------------------------------------------------------------
559: -- END OF Collection , Developer Customizable Section
552:
553: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
554: ' rows into the EDW_ORGA_BUSINESS_GROUP_LSTG staging table');
555: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
556: edw_log.put_line(' ');
557:
558: -- ---------------------------------------------------------------------------
559: -- END OF Collection , Developer Customizable Section
560: -- ---------------------------------------------------------------------------
603: -- -----------------------------------------------------------------------------
604: -- Start of Collection , Developer Customizable Section
605: -- -----------------------------------------------------------------------------
606:
607: edw_log.put_line(' ');
608: edw_log.put_line('Pushing Legal Entities');
609:
610: l_temp_date := sysdate;
611:
604: -- Start of Collection , Developer Customizable Section
605: -- -----------------------------------------------------------------------------
606:
607: edw_log.put_line(' ');
608: edw_log.put_line('Pushing Legal Entities');
609:
610: l_temp_date := sysdate;
611:
612: Insert Into EDW_ORGA_LEG_ENTITY_LSTG@EDW_APPS_TO_WH(
672:
673: l_rows_inserted := nvl(sql%rowcount,0);
674: l_duration := sysdate - l_temp_date;
675:
676: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
677: ' rows into the EDW_ORGA_LEG_ENTITY_LSTG staging table');
678:
679: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
680: edw_log.put_line(' ');
675:
676: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
677: ' rows into the EDW_ORGA_LEG_ENTITY_LSTG staging table');
678:
679: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
680: edw_log.put_line(' ');
681:
682: -- Start of change by S.Bhattal, 11-OCT-2000
683:
676: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
677: ' rows into the EDW_ORGA_LEG_ENTITY_LSTG staging table');
678:
679: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
680: edw_log.put_line(' ');
681:
682: -- Start of change by S.Bhattal, 11-OCT-2000
683:
684: l_tmp_str := EDW_COLLECTION_UTIL.get_lookup_value(
684: l_tmp_str := EDW_COLLECTION_UTIL.get_lookup_value(
685: 'EDW_LEVEL_LOOKUP', 'ORG_LEGAL_ENTITY' );
686:
687: if(l_tmp_str is null) THEN
688: edw_log.put_line('***Warning*** : No Lookup Code Found in GET_LOOKUP_VALUE when Pushing Legal Entity');
689: end if;
690:
691: -- End of change by S.Bhattal, 11-OCT-2000
692:
689: end if;
690:
691: -- End of change by S.Bhattal, 11-OCT-2000
692:
693: edw_log.put_line( 'Pushing Business Groups to Legal Entity level' );
694:
695: Insert Into EDW_ORGA_LEG_ENTITY_LSTG@EDW_APPS_TO_WH(
696: BUSINESS_GROUP_FK,
697: BUSINESS_GROUP_FK_KEY,
755:
756: l_rows_inserted := nvl(sql%rowcount,0);
757: l_duration := sysdate - l_temp_date;
758:
759: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
760: ' rows into the EDW_ORGA_BUSINESS_GRP_LSTG staging table');
761:
762: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
763: edw_log.put_line(' ');
758:
759: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
760: ' rows into the EDW_ORGA_BUSINESS_GRP_LSTG staging table');
761:
762: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
763: edw_log.put_line(' ');
764:
765: -- ---------------------------------------------------------------------------
766: -- END OF Collection , Developer Customizable Section
759: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
760: ' rows into the EDW_ORGA_BUSINESS_GRP_LSTG staging table');
761:
762: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
763: edw_log.put_line(' ');
764:
765: -- ---------------------------------------------------------------------------
766: -- END OF Collection , Developer Customizable Section
767: -- ---------------------------------------------------------------------------
808: -- -----------------------------------------------------------------------------
809: -- Start of Collection , Developer Customizable Section
810: -- -----------------------------------------------------------------------------
811:
812: edw_log.put_line(' ');
813: edw_log.put_line('Pushing Business Groups');
814:
815: l_temp_date := sysdate;
816:
809: -- Start of Collection , Developer Customizable Section
810: -- -----------------------------------------------------------------------------
811:
812: edw_log.put_line(' ');
813: edw_log.put_line('Pushing Business Groups');
814:
815: l_temp_date := sysdate;
816:
817: Insert Into EDW_ORGA_BUSINESS_GRP_LSTG@EDW_APPS_TO_WH(
877:
878: l_rows_inserted := nvl(sql%rowcount,0);
879: l_duration := sysdate - l_temp_date;
880:
881: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
882: ' rows into the EDW_ORGA_BUSINESS_GRP_LSTG staging table');
883:
884: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
885: edw_log.put_line(' ');
880:
881: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
882: ' rows into the EDW_ORGA_BUSINESS_GRP_LSTG staging table');
883:
884: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
885: edw_log.put_line(' ');
886:
887: -- ---------------------------------------------------------------------------
888: -- END OF Collection , Developer Customizable Section
881: edw_log.put_line( 'Inserted ' || to_char(l_rows_inserted) ||
882: ' rows into the EDW_ORGA_BUSINESS_GRP_LSTG staging table');
883:
884: edw_log.put_line('Process Time: '||edw_log.duration(l_duration));
885: edw_log.put_line(' ');
886:
887: -- ---------------------------------------------------------------------------
888: -- END OF Collection , Developer Customizable Section
889: -- ---------------------------------------------------------------------------
891: Exception
892:
893: When others then
894:
895: edw_log.put_line( 'In exception section of Push_Business_Grp' );
896: Errbuf := sqlerrm;
897: Retcode := sqlcode;
898: EDW_ORGANIZATION_M_C.g_exception_message := Retcode || ':' || Errbuf;
899: rollback;
913: BEGIN
914:
915: FOR v_push_to_level IN 1..g_number_of_levels LOOP
916:
917: edw_log.put_line('Starting Push_EDW_ORGA_TREE' || p_tree || '_LVL' ||
918: v_push_to_level || '_LSTG');
919: edw_log.put_line(' ');
920:
921: FOR v_push_from_view IN v_push_to_level..g_number_of_levels LOOP
915: FOR v_push_to_level IN 1..g_number_of_levels LOOP
916:
917: edw_log.put_line('Starting Push_EDW_ORGA_TREE' || p_tree || '_LVL' ||
918: v_push_to_level || '_LSTG');
919: edw_log.put_line(' ');
920:
921: FOR v_push_from_view IN v_push_to_level..g_number_of_levels LOOP
922:
923: Do_Insert( p_tree_number => p_tree,
959: End If;
960:
961: -- Added by S.Bhattal, AUG-2000
962:
963: edw_log.put_line( 'About to do 1st date conversion' );
964: l_from_date := to_date(p_from_date, 'YYYY/MM/DD HH24:MI:SS');
965: edw_log.put_line( '1st date conversion completed ok' );
966: l_to_date := to_date(p_to_date, 'YYYY/MM/DD HH24:MI:SS');
967: edw_log.put_line( '2nd date conversion completed ok' );
961: -- Added by S.Bhattal, AUG-2000
962:
963: edw_log.put_line( 'About to do 1st date conversion' );
964: l_from_date := to_date(p_from_date, 'YYYY/MM/DD HH24:MI:SS');
965: edw_log.put_line( '1st date conversion completed ok' );
966: l_to_date := to_date(p_to_date, 'YYYY/MM/DD HH24:MI:SS');
967: edw_log.put_line( '2nd date conversion completed ok' );
968:
969: -- End of change
963: edw_log.put_line( 'About to do 1st date conversion' );
964: l_from_date := to_date(p_from_date, 'YYYY/MM/DD HH24:MI:SS');
965: edw_log.put_line( '1st date conversion completed ok' );
966: l_to_date := to_date(p_to_date, 'YYYY/MM/DD HH24:MI:SS');
967: edw_log.put_line( '2nd date conversion completed ok' );
968:
969: -- End of change
970:
971: g_push_date_range1 := nvl(l_from_date,
972: EDW_COLLECTION_UTIL.G_local_last_push_start_date - EDW_COLLECTION_UTIL.g_offset);
973:
974: g_push_date_range2 := nvl(l_to_date, EDW_COLLECTION_UTIL.G_local_curr_push_start_date);
975:
976: edw_log.put_line( 'The collection range is from '||
977: to_char(g_push_date_range1,'MM/DD/YYYY HH24:MI:SS')||' to '||
978: to_char(g_push_date_range2,'MM/DD/YYYY HH24:MI:SS'));
979:
980: /* Call to HRI Org Hierarchy Table package */
978: to_char(g_push_date_range2,'MM/DD/YYYY HH24:MI:SS'));
979:
980: /* Call to HRI Org Hierarchy Table package */
981: /*******************************************/
982: edw_log.put_line(' ');
983: edw_log.put_line( 'Populating HRI Org Hierarchy table');
984: hri_edw_dim_organization.populate_primary_org_hrchy_tab;
985: edw_log.put_line( 'Finished populating HRI Org Hierarchy table');
986:
979:
980: /* Call to HRI Org Hierarchy Table package */
981: /*******************************************/
982: edw_log.put_line(' ');
983: edw_log.put_line( 'Populating HRI Org Hierarchy table');
984: hri_edw_dim_organization.populate_primary_org_hrchy_tab;
985: edw_log.put_line( 'Finished populating HRI Org Hierarchy table');
986:
987: edw_log.put_line(' ');
981: /*******************************************/
982: edw_log.put_line(' ');
983: edw_log.put_line( 'Populating HRI Org Hierarchy table');
984: hri_edw_dim_organization.populate_primary_org_hrchy_tab;
985: edw_log.put_line( 'Finished populating HRI Org Hierarchy table');
986:
987: edw_log.put_line(' ');
988: edw_log.put_line( 'About to call bottom-level orgs routine' );
989:
983: edw_log.put_line( 'Populating HRI Org Hierarchy table');
984: hri_edw_dim_organization.populate_primary_org_hrchy_tab;
985: edw_log.put_line( 'Finished populating HRI Org Hierarchy table');
986:
987: edw_log.put_line(' ');
988: edw_log.put_line( 'About to call bottom-level orgs routine' );
989:
990: Edw_Organization_m_C.Push_INT_ORGANIZATION(
991: Errbuf,
984: hri_edw_dim_organization.populate_primary_org_hrchy_tab;
985: edw_log.put_line( 'Finished populating HRI Org Hierarchy table');
986:
987: edw_log.put_line(' ');
988: edw_log.put_line( 'About to call bottom-level orgs routine' );
989:
990: Edw_Organization_m_C.Push_INT_ORGANIZATION(
991: Errbuf,
992: Retcode,
993: g_push_date_range1,
994: g_push_date_range2
995: );
996:
997: edw_log.put_line( 'Bottom-level orgs routine completed ok' );
998: edw_log.put_line( 'About to call Operating Units routine' );
999:
1000: Edw_Organization_M_C.Push_Oper_Unit(
1001: Errbuf,
994: g_push_date_range2
995: );
996:
997: edw_log.put_line( 'Bottom-level orgs routine completed ok' );
998: edw_log.put_line( 'About to call Operating Units routine' );
999:
1000: Edw_Organization_M_C.Push_Oper_Unit(
1001: Errbuf,
1002: Retcode,
1003: g_push_date_range1,
1004: g_push_date_range2
1005: );
1006:
1007: edw_log.put_line( 'Operating Units routine completed ok' );
1008: edw_log.put_line( 'About to call Legal Entities routine' );
1009:
1010: Edw_Organization_m_C.Push_Legal_Entity(
1011: Errbuf,
1004: g_push_date_range2
1005: );
1006:
1007: edw_log.put_line( 'Operating Units routine completed ok' );
1008: edw_log.put_line( 'About to call Legal Entities routine' );
1009:
1010: Edw_Organization_m_C.Push_Legal_Entity(
1011: Errbuf,
1012: Retcode,
1013: g_push_date_range1,
1014: g_push_date_range2
1015: );
1016:
1017: edw_log.put_line( 'Legal Entities routine completed ok' );
1018: edw_log.put_line( 'About to call Business Groups routine' );
1019:
1020: Edw_Organization_M_C.Push_Business_Grp(
1021: Errbuf,
1014: g_push_date_range2
1015: );
1016:
1017: edw_log.put_line( 'Legal Entities routine completed ok' );
1018: edw_log.put_line( 'About to call Business Groups routine' );
1019:
1020: Edw_Organization_M_C.Push_Business_Grp(
1021: Errbuf,
1022: Retcode,
1023: g_push_date_range1,
1024: g_push_date_range2
1025: );
1026:
1027: edw_log.put_line( 'Business Groups routine completed ok' );
1028:
1029:
1030: /*************************************************/
1031: /* New changes implemented by HRI */
1031: /* New changes implemented by HRI */
1032: /* 8 Levels inserted */
1033: /*************************************************/
1034:
1035: edw_log.put_line( 'About to call Org Tree 1 routine' );
1036:
1037: Edw_Organization_M_C.Push_Tree(
1038: p_from_date => g_push_date_range1,
1039: p_to_date => g_push_date_range2,
1038: p_from_date => g_push_date_range1,
1039: p_to_date => g_push_date_range2,
1040: p_tree => 1 );
1041:
1042: edw_log.put_line( 'Org Tree 1 routine completed ok' );
1043:
1044: /*************************************************/
1045:
1046: EDW_COLLECTION_UTIL.wrapup(TRUE, EDW_ORGANIZATION_M_C.g_row_count, null, g_push_date_range1, g_push_date_range2);