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

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

Line 954: insert into msd_cs_data

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

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

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

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

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

Line 1541: /* MSD_CS_DATALOAD_INVALID_DIM - Invalid Dimensions */

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

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

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

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

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

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

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

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

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

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

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

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

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

Line 1889: delete from msd_cs_data where cs_definition_id = p_cs_definition_id

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

Line 1904: UPDATE msd_cs_data

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

Line 1915: UPDATE msd_cs_data

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

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

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

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

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

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

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

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

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

Line 2173: update msd_cs_data_headers

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

Line 2194: msd_cs_data_headers table.

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

Line 2204: INSERT INTO msd_cs_data_headers

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

Line 2216: VALUES ( msd_cs_data_headers_s.nextval,

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

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

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