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 685: delete from MSD_ST_CS_DATA

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

Line 707: from msd_st_cs_data

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

Line 729: delete from msd_st_cs_data

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

Line 743: insert into msd_st_cs_data (

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

Line 765: select msd_st_cs_data_s.nextval,

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

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

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

Line 811: (p_target_table = 'MSD_ST_CS_DATA') then

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

Line 838: update msd_st_cs_data

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

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

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

Line 863: (p_target_table = 'MSD_ST_CS_DATA') then

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

Line 898: insert into msd_st_cs_data

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

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

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

Line 1101: if p_source_view = 'MSD_ST_CS_DATA' then

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

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

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

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

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

Line 1868: from msd_st_cs_data

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

Line 1875: from msd_st_cs_data

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

Line 1894: delete from msd_st_cs_data where cs_definition_id = p_cs_definition_id

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

Line 1934: delete from msd_st_cs_data

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