DBA Data[Home] [Help]

APPS.MSD_CS_COLLECTION dependencies on MSD_ST_CS_DATA

Line 331: l_target := 'MSD_ST_CS_DATA';

327: Set Source and Target
328: Set Global var for processing error record and marking processed */
329:
330: /* Collect into staging without Validation. Validation will be done in PULL */
331: l_target := 'MSD_ST_CS_DATA';
332: l_process_type := C_SOURCE_TO_STAGE;
333: l_source := l_cs_rec.source_view_name;
334: /* Internally transformed 2 step collection, always performs complete
335: refresh for collection part */

Line 377: l_source := 'MSD_ST_CS_DATA';

373: /* Pull
374: Set Source and Target
375: Set Global var for processing error record and marking processed */
376: l_target := 'MSD_CS_DATA';
377: l_source := 'MSD_ST_CS_DATA';
378: l_process_type := C_STAGE_TO_FACT;
379: l_default_where := Build_Designator_Where_Clause( l_cs_rec,
380: l_process_type,
381: p_cs_name);

Line 419: l_target := 'MSD_ST_CS_DATA';

415: /*
416: Set Source and Target
417: Set Global var for processing error record and marking processed
418: */
419: l_target := 'MSD_ST_CS_DATA';
420: l_process_type := C_SOURCE_TO_STAGE;
421: l_source := l_cs_rec.source_view_name;
422: l_default_where := Build_Designator_Where_Clause( l_cs_rec,
423: l_process_type,

Line 466: l_target := 'MSD_ST_CS_DATA';

462: errbuf := 'Invalid option - Single Step Collection must perform Validation';
463: return;
464: ELSIF (l_single_step_collection = 'N' and p_validate_data = 'N') THEN
465: /* Collect into staging without Validation */
466: l_target := 'MSD_ST_CS_DATA';
467: l_process_type := C_SOURCE_TO_STAGE;
468: l_source := l_cs_rec.source_view_name;
469: l_default_where := Build_Designator_Where_Clause( l_cs_rec,
470: l_process_type,

Line 516: l_source := 'MSD_ST_CS_DATA';

512: Set Source and Target
513: Set Global var for processing error record and marking processed
514: */
515: l_target := 'MSD_CS_DATA';
516: l_source := 'MSD_ST_CS_DATA';
517: l_process_type := C_STAGE_TO_FACT;
518: l_default_where := Build_Designator_Where_Clause(
519: l_cs_rec ,
520: l_process_type ,

Line 684: delete from MSD_ST_CS_DATA

680: /* DWK Don't delete any row with instance = 0 */
681: /* Also, removed cs_name = p_cs_name condition from WHERE clause */
682:
683: IF p_process_type = C_STAGE_TO_FACT THEN
684: delete from MSD_ST_CS_DATA
685: where
686: cs_definition_id = p_cs_rec.cs_definition_id and
687: process_Status = C_LOG_PROCESSED and
688: attribute_1 <> '0';

Line 706: from msd_st_cs_data

702: p_instance_id in varchar2 ) is
703:
704: cursor c1 is
705: select 'Y'
706: from msd_st_cs_data
707: where cs_definition_id = p_cs_rec.cs_definition_id
708: and cs_name = p_cs_name
709: and attribute_1 = p_instance_id
710: and attribute_49 = '1'

Line 728: delete from msd_st_cs_data

724: fetch c1 into l_exists;
725: close c1;
726:
727: If l_exists = 'Y' then
728: delete from msd_st_cs_data
729: where cs_definition_id = p_cs_Rec.cs_definition_id
730: and cs_name = p_cs_name
731: and attribute_1 = p_instance_id
732: and attribute_49 = '2';

Line 742: insert into msd_st_cs_data (

738: /* Collect Current On-Hand Inventory data from ODS table for SOP data stream */
739:
740: if p_cs_rec.name = 'MSD_ONHAND_INVENTORY' then
741:
742: insert into msd_st_cs_data (
743: CS_ST_DATA_ID,
744: CS_DEFINITION_ID,
745: CS_NAME,
746: ATTRIBUTE_1,

Line 764: select msd_st_cs_data_s.nextval,

760: LAST_UPDATE_DATE,
761: LAST_UPDATED_BY,
762: LAST_UPDATE_LOGIN
763: )
764: select msd_st_cs_data_s.nextval,
765: to_char(p_cs_rec.cs_definition_id),
766: 'SINGLE_STREAM',
767: to_char(inv.sr_instance_id),
768: inv.prd_level_id,

Line 809: if (p_target_table = 'MSD_CS_DATA' and p_source_view <> 'MSD_ST_CS_DATA') or

805: /*
806: Error Logging depends on source and target.
807: */
808: debug_line('In Log Error');
809: if (p_target_table = 'MSD_CS_DATA' and p_source_view <> 'MSD_ST_CS_DATA') or
810: (p_target_table = 'MSD_ST_CS_DATA') then
811: /*
812: if data is collected directly from source to Fact table or
813: data is collected into staging table then

Line 810: (p_target_table = 'MSD_ST_CS_DATA') then

806: Error Logging depends on source and target.
807: */
808: debug_line('In Log Error');
809: if (p_target_table = 'MSD_CS_DATA' and p_source_view <> 'MSD_ST_CS_DATA') or
810: (p_target_table = 'MSD_ST_CS_DATA') then
811: /*
812: if data is collected directly from source to Fact table or
813: data is collected into staging table then
814: insert erroneous row in staging table with Status "Error"

Line 837: update msd_st_cs_data

833:
834: Procedure upd_stage_error (p_pk_id in number, p_process_status in varchar2, p_error_mesg in varchar2) is
835: Begin
836: debug_line('In upd_stage_error');
837: update msd_st_cs_data
838: set
839: error_desc = p_error_mesg,
840: process_status = p_process_status
841: where cs_st_data_id = p_pk_id;

Line 861: if (p_target_table = 'MSD_CS_DATA' and p_source_view <> 'MSD_ST_CS_DATA') or

857: Begin
858: debug_line('In log_processed');
859: /* Process Logging depends on source and target.
860: */
861: if (p_target_table = 'MSD_CS_DATA' and p_source_view <> 'MSD_ST_CS_DATA') or
862: (p_target_table = 'MSD_ST_CS_DATA') then
863: /*
864: if data is collected directly from source to Fact table or
865: data is collected into staging table then

Line 862: (p_target_table = 'MSD_ST_CS_DATA') then

858: debug_line('In log_processed');
859: /* Process Logging depends on source and target.
860: */
861: if (p_target_table = 'MSD_CS_DATA' and p_source_view <> 'MSD_ST_CS_DATA') or
862: (p_target_table = 'MSD_ST_CS_DATA') then
863: /*
864: if data is collected directly from source to Fact table or
865: data is collected into staging table then
866: Processing can not be logged or is not yet done

Line 897: insert into msd_st_cs_data

893: p_process_status in varchar2,
894: p_error_message in varchar2) is
895: Begin
896: -- debug_line('In ins_row_staging');
897: insert into msd_st_cs_data
898: (cs_st_data_id, cs_definition_id, cs_name,
899: attribute_1, attribute_2, attribute_3, attribute_4,
900: attribute_5, attribute_6, attribute_7, attribute_8, attribute_9,
901: attribute_10, attribute_11, attribute_12, attribute_13,

Line 918: (msd_st_cs_data_s.nextval, p_cs_rec.cs_definition_id, crec_data.designator,

914: created_by, creation_date, last_update_date, last_updated_by, last_update_login
915: )
916: values
917: /* Fix for designator name crec_data.designator instead of p_cs_name */
918: (msd_st_cs_data_s.nextval, p_cs_rec.cs_definition_id, crec_data.designator,
919: p_instance_id,
920: crec_data.prd_level_id, crec_data.prd_sr_level_value_pk, crec_data.prd_level_value, crec_data.prd_level_value_pk,
921: crec_data.geo_level_id, crec_data.geo_sr_level_value_pk, crec_data.geo_level_value, crec_data.geo_level_value_pk,
922: crec_data.org_level_id, crec_data.org_sr_level_value_pk, crec_data.org_level_value, crec_data.org_level_value_pk,

Line 1100: if p_source_view = 'MSD_ST_CS_DATA' then

1096: l_sql_stmt := Build_SQL_Source(p_cs_definition_id, p_process_type, NULL, p_cs_name);
1097: /*
1098: Append data specific to Single Step needs
1099: */
1100: if p_source_view = 'MSD_ST_CS_DATA' then
1101: l_sql_stmt := 'Select cs_st_data_id PK_ID, ' || l_sql_stmt || ' from ' || p_source_view ;
1102: else
1103: l_sql_stmt := 'Select null pk_id, ' || l_sql_stmt || ' from ' || p_source_view || p_db_link;
1104: end if;

Line 1135: l_sql_stmt := 'Insert into MSD_ST_CS_DATA (cs_st_data_id , cs_definition_id, ' ||

1131: p_instance_id, p_cs_name);
1132:
1133: /* DWK Move cs_name from top to at the bottom of insert statement since
1134: l_sql_stmt will have forecast_designator inside. */
1135: l_sql_stmt := 'Insert into MSD_ST_CS_DATA (cs_st_data_id , cs_definition_id, ' ||
1136: 'attribute_1, attribute_2, attribute_3, attribute_4, attribute_5, ' ||
1137: 'attribute_6, attribute_7, attribute_8, attribute_9, attribute_10,' ||
1138: 'attribute_11, attribute_12, attribute_13, attribute_14, attribute_15, ' ||
1139: 'attribute_16, attribute_17, attribute_18, attribute_19, attribute_20, ' ||

Line 1148: 'cs_name ) ' || ' select ' || 'msd_st_cs_Data_s.nextval, ' || p_cs_definition_id ||

1144: 'attribute_41, attribute_42, attribute_43, attribute_44, attribute_45, ' ||
1145: 'attribute_46, attribute_47, attribute_48, attribute_49, attribute_50, ' ||
1146: 'attribute_51, attribute_52, attribute_53, attribute_54, attribute_55, ' ||
1147: 'attribute_56, attribute_57, attribute_58, attribute_59, attribute_60,' ||
1148: 'cs_name ) ' || ' select ' || 'msd_st_cs_Data_s.nextval, ' || p_cs_definition_id ||
1149: ', ' || l_sql_stmt || ' from ' || p_source_view || p_db_link;
1150:
1151: return l_sql_stmt;
1152:

Line 1867: from msd_st_cs_data

1863: l_sql_stmt varchar2(2000);
1864:
1865: cursor C_GET_DEL_CRIT is
1866: select distinct attribute_1 instance, cs_name
1867: from msd_st_cs_data
1868: where cs_definition_id = p_cs_definition_id and
1869: cs_name = nvl(p_cs_name, cs_name);
1870:
1871: /* DWK create a separe cursor to fetch instance in single stream case */

Line 1874: from msd_st_cs_data

1870:
1871: /* DWK create a separe cursor to fetch instance in single stream case */
1872: cursor c_get_del_crit_single is
1873: select distinct attribute_1 instance
1874: from msd_st_cs_data
1875: where cs_definition_id = p_cs_definition_id;
1876:
1877: cursor c_multi_stream is
1878: select nvl(multiple_stream_flag,'N')

Line 1893: delete from msd_st_cs_data where cs_definition_id = p_cs_definition_id

1889: delete from msd_cs_data where cs_definition_id = p_cs_definition_id
1890: and cs_name = nvl(p_cs_name, cs_name) and attribute_1 = nvl(p_instance_id, attribute_1);
1891: */
1892: IF p_process_type = C_SOURCE_TO_STAGE then
1893: delete from msd_st_cs_data where cs_definition_id = p_cs_definition_id
1894: and cs_name = nvl(p_cs_name, cs_name) and attribute_1 = nvl(p_instance_id, attribute_1);
1895:
1896: elsif p_process_type = C_STAGE_TO_FACT then
1897: /* DWK For single stream, ignore the CS_NAME column for refresh */

Line 1933: delete from msd_st_cs_data

1929: This will make custom stream collection behaviour same as other
1930: collection (Bookking/Shipment)
1931: */
1932: IF p_process_type = C_SOURCE_TO_STAGE then
1933: delete from msd_st_cs_data
1934: where cs_definition_id = p_cs_definition_id and
1935: cs_name = nvl(p_cs_name, cs_name) and
1936: attribute_1 = nvl(p_instance_id, attribute_1);
1937: END IF;