DBA Data[Home] [Help]

APPS.MSD_CS_COLLECTION dependencies on MSD_CS_DATA

Line 376: l_target := 'MSD_CS_DATA';

372:
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,

Line 515: l_target := 'MSD_CS_DATA';

511: /*
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 ,

Line 565: IF (l_target = 'MSD_CS_DATA') THEN

561: END IF; /* End of p_validate_data = 'Y' */
562: END IF; /* End of Collect or Pull */
563:
564:
565: IF (l_target = 'MSD_CS_DATA') THEN
566: /* Delete cs fact rows that are not used by any demand plans */
567: MSD_TRANSLATE_FACT_DATA.clean_fact_data( errbuf,
568: retcode,
569: l_target,

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 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 877: if p_target_table = 'MSD_CS_DATA' then

873: */
874: upd_stage_error(crec_data.pk_id, C_LOG_PROCESSED, null);
875: end if;
876:
877: if p_target_table = 'MSD_CS_DATA' then
878:
879: null;
880: end if;
881:

Line 955: insert into msd_cs_data

951: p_instance_id in varchar2,
952: p_new_refresh_num in NUMBER) is
953: Begin
954: debug_line('In ins_row_fact');
955: insert into msd_cs_data
956: (cs_data_id, cs_definition_id, cs_name,
957: attribute_1, attribute_2, attribute_3, attribute_4,
958: attribute_5, attribute_6, attribute_7, attribute_8, attribute_9,
959: attribute_10, attribute_11, attribute_12, attribute_13,

Line 975: (msd_cs_data_s.nextval, p_cs_rec.cs_definition_id, crec_data.designator ,

971: created_by, creation_date, last_update_date, last_updated_by,last_update_login,
972: created_by_refresh_num, last_refresh_num, action_code)
973: values
974: /* Fix for designator name crec_data.designator instead of p_cs_name */
975: (msd_cs_data_s.nextval, p_cs_rec.cs_definition_id, crec_data.designator ,
976: p_instance_id,
977: crec_data.prd_level_id, crec_data.prd_sr_level_value_pk, crec_data.prd_level_value, crec_data.prd_level_value_pk,
978: crec_data.geo_level_id, crec_data.geo_sr_level_value_pk, crec_data.geo_level_value, crec_data.geo_level_value_pk,
979: crec_data.org_level_id, crec_data.org_sr_level_value_pk, crec_data.org_level_value, crec_data.org_level_value_pk,

Line 1541: /* MSD_CS_DATALOAD_INVALID_LVLID - Invalid Level ID for Dimensions */

1537: END IF;
1538:
1539:
1540:
1541: /* MSD_CS_DATALOAD_INVALID_LVLID - Invalid Level ID for Dimensions */
1542: /* MSD_CS_DATALOAD_INVALID_DIM - Invalid Dimensions */
1543: select decode(l_comments2, null, null, 'MSD_CS_DATALOAD_INVALID_DIM : ' || l_comments2) ||
1544: decode(l_comments1, null, null, 'MSD_CS_DATALOAD_INVALID_LVLID : ' || l_comments1)
1545: into p_err_mesg

Line 1542: /* MSD_CS_DATALOAD_INVALID_DIM - Invalid Dimensions */

1538:
1539:
1540:
1541: /* MSD_CS_DATALOAD_INVALID_LVLID - Invalid Level ID for Dimensions */
1542: /* MSD_CS_DATALOAD_INVALID_DIM - Invalid Dimensions */
1543: select decode(l_comments2, null, null, 'MSD_CS_DATALOAD_INVALID_DIM : ' || l_comments2) ||
1544: decode(l_comments1, null, null, 'MSD_CS_DATALOAD_INVALID_LVLID : ' || l_comments1)
1545: into p_err_mesg
1546: from dual;

Line 1543: select decode(l_comments2, null, null, 'MSD_CS_DATALOAD_INVALID_DIM : ' || l_comments2) ||

1539:
1540:
1541: /* MSD_CS_DATALOAD_INVALID_LVLID - Invalid Level ID for Dimensions */
1542: /* MSD_CS_DATALOAD_INVALID_DIM - Invalid Dimensions */
1543: select decode(l_comments2, null, null, 'MSD_CS_DATALOAD_INVALID_DIM : ' || l_comments2) ||
1544: decode(l_comments1, null, null, 'MSD_CS_DATALOAD_INVALID_LVLID : ' || l_comments1)
1545: into p_err_mesg
1546: from dual;
1547:

Line 1544: decode(l_comments1, null, null, 'MSD_CS_DATALOAD_INVALID_LVLID : ' || l_comments1)

1540:
1541: /* MSD_CS_DATALOAD_INVALID_LVLID - Invalid Level ID for Dimensions */
1542: /* MSD_CS_DATALOAD_INVALID_DIM - Invalid Dimensions */
1543: select decode(l_comments2, null, null, 'MSD_CS_DATALOAD_INVALID_DIM : ' || l_comments2) ||
1544: decode(l_comments1, null, null, 'MSD_CS_DATALOAD_INVALID_LVLID : ' || l_comments1)
1545: into p_err_mesg
1546: from dual;
1547:
1548: /* Validate Date Format */

Line 1555: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_DATE_FORMAT : ATTRIBUTE_43';

1551: into l_dummy_date
1552: from dual;
1553: Exception
1554: When others then
1555: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_DATE_FORMAT : ATTRIBUTE_43';
1556: End;
1557:
1558: /* Validate Amount Number Format */
1559: Begin

Line 1566: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_NUMBER_FORMAT : ATTRIBUTE_42';

1562: l_dummy_number := crec_data.attribute_42;
1563: end if;
1564: Exception
1565: When others then
1566: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_NUMBER_FORMAT : ATTRIBUTE_42';
1567: End;
1568:
1569: /* Validate Quantity Number Format */
1570: Begin

Line 1577: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_NUMBER_FORMAT : ATTRIBUTE_41';

1573: l_dummy_number := crec_data.attribute_41;
1574: end if;
1575: Exception
1576: When others then
1577: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_NUMBER_FORMAT : ATTRIBUTE_41';
1578: End;
1579:
1580: /* Validate Price Number Format */
1581: Begin

Line 1588: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_NUMBER_FORMAT : ATTRIBUTE_44';

1584: l_dummy_number := crec_data.attribute_44;
1585: end if;
1586: Exception
1587: When others then
1588: p_err_mesg := p_err_mesg || ' MSD_CS_DATALOAD_INVALID_NUMBER_FORMAT : ATTRIBUTE_44';
1589: End;
1590:
1591: if p_err_mesg is null then
1592: return TRUE;

Line 1890: delete from msd_cs_data where cs_definition_id = p_cs_definition_id

1886: debug_line('In refresh_target');
1887: if p_comp_refresh = 'Y' then
1888:
1889: /* if p_process_type = C_SOURCE_TO_FACT then
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

Line 1905: UPDATE msd_cs_data

1901: close c_multi_stream;
1902:
1903: IF (l_multi_flag = 'Y') THEN
1904: For l_rec IN c_get_del_crit LOOP
1905: UPDATE msd_cs_data
1906: SET Action_code = 'D',
1907: last_refresh_num = p_new_refresh_num
1908: WHERE cs_definition_id = p_cs_definition_id and
1909: cs_name = l_rec.cs_name and

Line 1916: UPDATE msd_cs_data

1912: END LOOP;
1913:
1914: ELSE /* For single stream, ignore the cs_name in delete stmt */
1915: For l_rec IN c_get_del_crit_single LOOP
1916: UPDATE msd_cs_data
1917: SET Action_code = 'D',
1918: last_refresh_num = p_new_refresh_num
1919: WHERE cs_definition_id = p_cs_definition_id and
1920: attribute_1 = l_rec.instance and

Line 1995: IF (p_target_table = 'MSD_CS_DATA') THEN

1991: IF l_valid THEN
1992: /* IMP : Instance is p_instance in case of Collect
1993: and l_rec.instance in case of PULLL i.e. from the staging
1994: table */
1995: IF (p_target_table = 'MSD_CS_DATA') THEN
1996: ins_row_fact(l_rec, p_cs_rec, l_rec.designator,
1997: nvl(p_instance_id, l_rec.instance),
1998: p_new_refresh_num);
1999:

Line 2006: /* DWK Populate MSD_CS_DATA_HEADERS table after inserting rows

2002: nvl(p_instance_id,l_rec.instance) <> nvl(l_temp_instance_id,-99999999) ) THEN
2003: l_temp_designator := l_rec.designator;
2004: l_temp_instance_id := nvl(p_instance_id,l_rec.instance);
2005:
2006: /* DWK Populate MSD_CS_DATA_HEADERS table after inserting rows
2007: into FACT table */
2008: insert_update_Into_Headers ( p_cs_rec.cs_definition_id,
2009: l_rec.designator,
2010: nvl(p_instance_id,l_rec.instance), p_new_refresh_num);

Line 2150: msd_cs_data_headers table or not and insert row if necessary.

2146: /*************************************************************************************************
2147: PROCEDURE Insert_update_Into_Headers
2148:
2149: This procedure will decide whether insert cs_definition_id, cs_name, and instance into
2150: msd_cs_data_headers table or not and insert row if necessary.
2151: **************************************************************************************************/
2152: Procedure insert_update_Into_Headers ( p_cs_definition_id in number,
2153: p_cs_name in varchar2,
2154: p_instance_id in number,

Line 2162: SELECT count(*) INTO p_count FROM msd_cs_data_headers_v1

2158: p_count NUMBER:=0;
2159:
2160: BEGIN
2161:
2162: SELECT count(*) INTO p_count FROM msd_cs_data_headers_v1
2163: WHERE instance = p_instance_id AND
2164: cs_definition_id = p_cs_definition_id AND
2165: cs_name = p_cs_name;
2166:

Line 2174: update msd_cs_data_headers

2170: p_instance_id,
2171: p_refresh_num);
2172: ELSE
2173:
2174: update msd_cs_data_headers
2175: set last_refresh_num = p_refresh_num
2176: where cs_definition_id = p_cs_definition_id
2177: and instance = p_instance_id
2178: and cs_name = p_cs_name;

Line 2195: msd_cs_data_headers table.

2191: /*************************************************************************************************
2192: PROCEDURE Insert_Data_Into_Headers
2193:
2194: This procedure will insert cs_definition_id, cs_name, and instance into
2195: msd_cs_data_headers table.
2196: **************************************************************************************************/
2197: Procedure Insert_Data_Into_Headers ( p_cs_definition_id in number,
2198: p_cs_name in varchar2,
2199: p_instance_id in number,

Line 2205: INSERT INTO msd_cs_data_headers

2201:
2202:
2203: BEGIN
2204:
2205: INSERT INTO msd_cs_data_headers
2206: ( CS_DATA_HEADER_ID,
2207: INSTANCE,
2208: CS_DEFINITION_ID,
2209: CS_NAME,

Line 2217: VALUES ( msd_cs_data_headers_s.nextval,

2213: CREATED_BY,
2214: LAST_UPDATE_LOGIN,
2215: LAST_REFRESH_NUM
2216: )
2217: VALUES ( msd_cs_data_headers_s.nextval,
2218: p_instance_id,
2219: p_cs_definition_id,
2220: p_cs_name,
2221: sysdate,

Line 2233: show_line('Error in inserting into MSD_CS_DATA_HEADERS');

2229:
2230:
2231: Exception
2232: When others then
2233: show_line('Error in inserting into MSD_CS_DATA_HEADERS');
2234: show_line(sqlerrm);
2235: raise;
2236:
2237: END Insert_Data_Into_Headers;