DBA Data[Home] [Help]

APPS.MSD_DEM_UPLOAD_FORECAST dependencies on MSD_DEM_UPLOAD_FORECAST

Line 1: PACKAGE BODY MSD_DEM_UPLOAD_FORECAST AS

1: PACKAGE BODY MSD_DEM_UPLOAD_FORECAST AS
2: /* $Header: msddemufb.pls 120.4.12010000.4 2008/07/11 09:52:20 syenamar ship $ */
3:
4: /*** CONSTANTS ***/
5:

Line 752: raise_application_error (-20001, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to find schema name');

748:
749: x_schema := fnd_profile.value('MSD_DEM_SCHEMA');
750: IF (x_schema IS NULL)
751: THEN
752: raise_application_error (-20001, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to find schema name');
753: END IF;
754:
755:
756:

Line 765: raise_application_error (-20002, 'Error: msd_dem_upload_forecast.upload_forecast - No export data profile name provided');

761:
762: /* Initialize global variables */
763: IF (p_export_data_profile IS NULL)
764: THEN
765: raise_application_error (-20002, 'Error: msd_dem_upload_forecast.upload_forecast - No export data profile name provided');
766: ELSE
767: x_export_data_profile := upper(p_export_data_profile);
768: END IF;
769:

Line 802: raise_application_error (-20003, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to get export data profile id');

798: /*** Check basic error conditions - BEGIN ***/
799:
800: IF (x_profile_id IS NULL)
801: THEN
802: raise_application_error (-20003, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to get export data profile id');
803: ELSIF (x_integration_type = C_IMPORT_DATA_PROFILE)
804: THEN
805: raise_application_error (-20004, 'Error: msd_dem_upload_forecast.upload_forecast - ' || p_export_data_profile || 'is not an export data profile');
806: ELSIF (x_export_type = C_EXPORT_TYPE_INCR)

Line 805: raise_application_error (-20004, 'Error: msd_dem_upload_forecast.upload_forecast - ' || p_export_data_profile || 'is not an export data profile');

801: THEN
802: raise_application_error (-20003, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to get export data profile id');
803: ELSIF (x_integration_type = C_IMPORT_DATA_PROFILE)
804: THEN
805: raise_application_error (-20004, 'Error: msd_dem_upload_forecast.upload_forecast - ' || p_export_data_profile || 'is not an export data profile');
806: ELSIF (x_export_type = C_EXPORT_TYPE_INCR)
807: THEN
808: raise_application_error (-20005, 'Error: msd_dem_upload_forecast.upload_forecast - Incremental export type is not supported');
809: ELSIF (x_index_id IS NOT NULL)

Line 808: raise_application_error (-20005, 'Error: msd_dem_upload_forecast.upload_forecast - Incremental export type is not supported');

804: THEN
805: raise_application_error (-20004, 'Error: msd_dem_upload_forecast.upload_forecast - ' || p_export_data_profile || 'is not an export data profile');
806: ELSIF (x_export_type = C_EXPORT_TYPE_INCR)
807: THEN
808: raise_application_error (-20005, 'Error: msd_dem_upload_forecast.upload_forecast - Incremental export type is not supported');
809: ELSIF (x_index_id IS NOT NULL)
810: THEN
811: raise_application_error (-20006, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast amount cannot be uploaded');
812: ELSIF (x_is_view_present = 0)

Line 811: raise_application_error (-20006, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast amount cannot be uploaded');

807: THEN
808: raise_application_error (-20005, 'Error: msd_dem_upload_forecast.upload_forecast - Incremental export type is not supported');
809: ELSIF (x_index_id IS NOT NULL)
810: THEN
811: raise_application_error (-20006, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast amount cannot be uploaded');
812: ELSIF (x_is_view_present = 0)
813: THEN
814: raise_application_error (-20007, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast has not yet been exported');
815: ELSIF (x_presentation_type = C_PSNT_TYPE_DESC)

Line 814: raise_application_error (-20007, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast has not yet been exported');

810: THEN
811: raise_application_error (-20006, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast amount cannot be uploaded');
812: ELSIF (x_is_view_present = 0)
813: THEN
814: raise_application_error (-20007, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast has not yet been exported');
815: ELSIF (x_presentation_type = C_PSNT_TYPE_DESC)
816: THEN
817: raise_application_error (-20008, 'Error: msd_dem_upload_forecast.upload_forecast - Presentation type must by Code');
818: END IF;

Line 817: raise_application_error (-20008, 'Error: msd_dem_upload_forecast.upload_forecast - Presentation type must by Code');

813: THEN
814: raise_application_error (-20007, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast has not yet been exported');
815: ELSIF (x_presentation_type = C_PSNT_TYPE_DESC)
816: THEN
817: raise_application_error (-20008, 'Error: msd_dem_upload_forecast.upload_forecast - Presentation type must by Code');
818: END IF;
819:
820: /*** Check basic error conditions - END ***/
821:

Line 842: raise_application_error (-20009, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to find schema name');

838: x_time_res_id);
839:
840: IF (x_res_type IS NULL)
841: THEN
842: raise_application_error (-20009, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to find schema name');
843: END IF;
844:
845: /*** Get Time Info - END ***/
846:

Line 869: raise_application_error (-20010, 'Error: msd_dem_upload_forecast.upload_forecast - Item or Product Family level is required for upload');

865: x_prd_level := get_level_column (x_profile_id, C_PRODUCT_FAMILY);
866:
867: IF (x_prd_level IS NULL)
868: THEN
869: raise_application_error (-20010, 'Error: msd_dem_upload_forecast.upload_forecast - Item or Product Family level is required for upload');
870: END IF;
871: ELSE
872: x_prd_key_column := get_series_column (x_profile_id, C_DKEY_SERIES_PREFIX, C_DKEY_ITEM);
873: END IF;

Line 887: raise_application_error (-20011, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to get sr_instance_id for global forecast');

883:
884: x_sr_instance_id_for_global := get_sr_instance_id_for_global;
885: IF (x_sr_instance_id_for_global IS NULL)
886: THEN
887: raise_application_error (-20011, 'Error: msd_dem_upload_forecast.upload_forecast - Unable to get sr_instance_id for global forecast');
888: END IF;
889:
890: ELSE
891: x_is_global_fcst := 2;

Line 919: raise_application_error (-20013, 'Error: msd_dem_upload_forecast.upload_forecast - Destination key series for the level Site not found');

915: x_ship_to_key_column := get_series_column (x_profile_id, C_DKEY_SERIES_PREFIX, C_DKEY_SITE);
916:
917: IF (x_ship_to_key_column IS NULL)
918: THEN
919: raise_application_error (-20013, 'Error: msd_dem_upload_forecast.upload_forecast - Destination key series for the level Site not found');
920: END IF;
921:
922: END IF;
923:

Line 935: x_sr_customer_id := ' msd_dem_upload_forecast.get_customer_from_tpzone ( exp.' || x_cust_zone_level || ', mai.instance_id ) ';

931: THEN
932: x_sr_customer_id := ' mtpsil.sr_cust_acct_id ';
933: ELSIF (x_cust_zone_level IS NOT NULL)
934: THEN
935: x_sr_customer_id := ' msd_dem_upload_forecast.get_customer_from_tpzone ( exp.' || x_cust_zone_level || ', mai.instance_id ) ';
936: END IF;
937:
938: x_zone_level := get_level_column (x_profile_id, C_ZONE);
939: IF (x_zone_level IS NOT NULL)

Line 945: x_sr_zone_id := ' msd_dem_upload_forecast.get_zone_from_tpzone ( exp.' || x_cust_zone_level || ', mai.instance_id ) ';

941: x_sr_zone_id := ' mr.region_id ';
942: x_from_clause := x_from_clause || ' msc_regions mr, ';
943: ELSIF (x_cust_zone_level IS NOT NULL)
944: THEN
945: x_sr_zone_id := ' msd_dem_upload_forecast.get_zone_from_tpzone ( exp.' || x_cust_zone_level || ', mai.instance_id ) ';
946: END IF;
947:
948: x_select_clause := x_select_clause || x_sr_ship_to_loc_id || ' , ' ||
949: x_sr_customer_id || ' , ' ||

Line 985: raise_application_error (-20014, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast series not found');

981: x_fcst_column := get_series_column (x_profile_id, C_FORECAST_SERIES_PREFIX);
982:
983: IF (x_fcst_column IS NULL)
984: THEN
985: raise_application_error (-20014, 'Error: msd_dem_upload_forecast.upload_forecast - Forecast series not found');
986: END IF;
987:
988: IF (x_unit_id = 1 OR upper(x_uom_code) = 'UNITS')
989: THEN

Line 1174: raise_application_error (-20014, 'Error: msd_dem_upload_forecast.upload_forecast - Error in call to custom hook msd_dem_custom_hooks.upload_hook');

1170:
1171:
1172: EXECUTE IMMEDIATE x_small_sql;
1173:
1174: raise_application_error (-20014, 'Error: msd_dem_upload_forecast.upload_forecast - Error in call to custom hook msd_dem_custom_hooks.upload_hook');
1175: END IF;
1176:
1177: COMMIT;
1178:

Line 1207: raise_application_error (-20015, 'Exception: msd_dem_upload_forecast.upload_forecast - ' || substr(SQLERRM,1,150));

1203: /* Alter session to demantra schema */
1204: x_small_sql := 'alter session set current_schema = ' || x_schema;
1205: EXECUTE IMMEDIATE x_small_sql;
1206:
1207: raise_application_error (-20015, 'Exception: msd_dem_upload_forecast.upload_forecast - ' || substr(SQLERRM,1,150));
1208:
1209: END UPLOAD_FORECAST;
1210:
1211:

Line 1212: END MSD_DEM_UPLOAD_FORECAST;

1208:
1209: END UPLOAD_FORECAST;
1210:
1211:
1212: END MSD_DEM_UPLOAD_FORECAST;