367: fetch c_get_dm_schema into x_dem_schema;
368: close c_get_dm_schema;
369:
370: if( x_dem_schema is not null) then
371: x_dem_schema := fnd_profile.value('MSD_DEM_SCHEMA');
372: end if;
373:
374: if( x_dem_schema is not null) then
375: delete_sql := 'DELETE FROM ' || x_dest_table || ' sales '
536: x_add_where_clause := x_add_where_clause || ' AND nvl(ooha.order_source_id, 0) <> 10 ';
537: ELSIF (p_collect_ISO = G_YES) THEN -- BUG#13716734 --kkhatri--12.3--BUG#14683310 --kkhatri--12.2.1
538:
539: MSD_DEM_COMMON_UTILITIES.GET_DBLINK(ERRBUF,RETCODE,P_SR_INSTANCE_ID,XDBLINK);
540: execute immediate 'select fnd_profile.value' || XDBLINK ||'(''MSC_SUBINVENTORY_PART_CONDITION'') from dual'
541: into x_profile_val;
542:
543: IF (x_profile_val is not null) THEN
544: x_add_where_clause := x_add_where_clause
708: x_add_where_clause := x_add_where_clause || ' AND decode(ool.to_whse, NULL, 10, 0) <> 10 ';
709: -- BUG#13716734 kkhatri 12.3 BUG#14683310 --kkhatri --12.2.1
710: ELSIF (p_collect_ISO = G_YES) THEN
711: MSD_DEM_COMMON_UTILITIES.GET_DBLINK(ERRBUF,RETCODE,P_SR_INSTANCE_ID,XDBLINK);
712: execute immediate 'select fnd_profile.value' || XDBLINK ||'(''MSC_SUBINVENTORY_PART_CONDITION'') from dual'
713: into x_profile_val;
714:
715: IF (x_profile_val is not null) THEN
716:
1287:
1288: if p_collection_method = 1 then
1289: x_sql := 'TRUNCATE TABLE ' || x_dest_table;
1290: else
1291: IF (nvl( fnd_profile.value( 'MSD_DEM_TRUNCATE_STG_TABLE'), 'N') = 'Y')
1292: THEN
1293: x_sql := 'TRUNCATE TABLE ' || x_dest_table;
1294: ELSE
1295: x_sql := 'DELETE FROM '|| x_dest_table || ' where sales_date between ''' || x_from_date || ''' AND ''' || x_to_date || '''';
1298:
1299: EXECUTE IMMEDIATE x_sql;
1300:
1301: IF (p_collection_method <> 1
1302: AND nvl( fnd_profile.value( 'MSD_DEM_TRUNCATE_STG_TABLE'), 'N') <> 'Y')
1303: THEN
1304:
1305: x_sql := 'DELETE FROM ' || x_dest_table || ' t1 '
1306: || ' WHERE ebs_parent_item_sr_pk is not null '
1730: */
1731: Begin
1732:
1733: if (g_schema is not null) then
1734: g_schema := fnd_profile.value('MSD_DEM_SCHEMA');
1735: end if;
1736:
1737: if (g_schema is not null)
1738: then
1962:
1963: BEGIN
1964: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1965:
1966: DEM_SCHEMA := fnd_profile.value('MSD_DEM_SCHEMA');
1967:
1968: IF (p_auto_run_download = G_YES)
1969: THEN
1970: if fnd_profile.value('MSD_DEM_SCHEMA') is not null then
1966: DEM_SCHEMA := fnd_profile.value('MSD_DEM_SCHEMA');
1967:
1968: IF (p_auto_run_download = G_YES)
1969: THEN
1970: if fnd_profile.value('MSD_DEM_SCHEMA') is not null then
1971:
1972:
1973:
1974: /*
2038:
2039:
2040: if l_user_name is not null
2041: then
2042: l_url := fnd_profile.value('MSD_DEM_HOST_URL');
2043:
2044: -- Bug#7199587 syenamar
2045: -- Do not hard-code 'EBS Full Download' workflow name here. Get its ID from lookup, get its name from demantra schema using the ID.
2046: