DBA Data[Home] [Help]

APPS.MSC_WS_ASCP dependencies on MSC_WS_COMMON

Line 47: msc_ws_common.validate_user_resp(l_val_result, userid, responsibilityid);

43: BEGIN
44: error_tracking_num := 1010;
45:
46: -- validate and initialize apps
47: msc_ws_common.validate_user_resp(l_val_result, userid, responsibilityid);
48:
49: IF(l_val_result <> 'OK') THEN
50: processid := -1;
51: status := l_val_result;

Line 134: AND lookup_code = decode(launchplanner, 'Y', msc_ws_common.sys_yes, msc_ws_common.sys_no);

130: FROM MFG_LOOKUPS
131: WHERE lookup_type = 'SYS_YES_NO'
132: AND ((lookup_code = 1 AND l_val_launchsnapshot in (1,3,4)) OR
133: (l_val_launchsnapshot = 2))
134: AND lookup_code = decode(launchplanner, 'Y', msc_ws_common.sys_yes, msc_ws_common.sys_no);
135: EXCEPTION
136: WHEN no_data_found THEN
137: processid := -1;
138: status := 'INVALID_LAUNCH_PLANNER';

Line 144: SELECT decode(archiveCurrVersPlan, 'Y', msc_ws_common.sys_yes, msc_ws_common.sys_no)

140: END;
141:
142: error_tracking_num := 1055;
143: BEGIN
144: SELECT decode(archiveCurrVersPlan, 'Y', msc_ws_common.sys_yes, msc_ws_common.sys_no)
145: INTO l_val_archivePlan
146: FROM dual;
147:
148: END;

Line 151: l_val_netchange := msc_ws_common.sys_no;

147:
148: END;
149:
150: -- netchange hidden parameter always set to the value 2, which is sys_no
151: l_val_netchange := msc_ws_common.sys_no;
152:
153:
154: -- populating PLAN_TYPE_DUMMY hidden parameter
155: -- Original default logic is "SELECT inventory_atp_flag from msc_designators d where

Line 199: AND lookup_code = decode(releasereschedules,'Y',msc_ws_common.sys_yes, msc_ws_common.sys_no);

195: INTO l_val_releasereschedules
196: FROM MFG_LOOKUPS
197: WHERE lookup_type='SYS_YES_NO'
198: AND (NVL(l_val_production,2)=1 or lookup_code=2)
199: AND lookup_code = decode(releasereschedules,'Y',msc_ws_common.sys_yes, msc_ws_common.sys_no);
200: EXCEPTION
201: WHEN no_data_found THEN
202: processid := -1;
203: status := 'INVALID_RELEASE_RESCHEDULES';

Line 211: SELECT to_number(decode(snapstaticentities, 'Y', msc_ws_common.sys_yes, msc_ws_common.sys_no))

207:
208: error_tracking_num := 1080;
209: -- snapstaticentities can be either Y or N, converted to 1 or 2
210: BEGIN
211: SELECT to_number(decode(snapstaticentities, 'Y', msc_ws_common.sys_yes, msc_ws_common.sys_no))
212: INTO l_val_snapstaticentities
213: FROM dual;
214: END;
215:

Line 277: MSC_WS_COMMON.GET_PERMISSION_IDS(l_String, userid, respid, l_SecutirtGroupId, UserName, RespName, RespApplName, SecurityGroupName, Language);

273: error_tracking_num number;
274: l_SecutirtGroupId NUMBER;
275: BEGIN
276: error_tracking_num :=2010;
277: MSC_WS_COMMON.GET_PERMISSION_IDS(l_String, userid, respid, l_SecutirtGroupId, UserName, RespName, RespApplName, SecurityGroupName, Language);
278: IF (l_String <> 'OK') THEN
279: Status := l_String;
280: RETURN;
281: END IF;

Line 284: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFNSCW-SCP',l_SecutirtGroupId);

280: RETURN;
281: END IF;
282:
283: error_tracking_num :=2030;
284: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFNSCW-SCP',l_SecutirtGroupId);
285: IF (l_String <> 'OK') THEN
286: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFPCMN-SCP', l_SecutirtGroupId);
287: IF (l_String <> 'OK') THEN
288: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSC_ORG_FNDRSRUN_LAUNCH_SCP',l_SecutirtGroupId);

Line 286: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFPCMN-SCP', l_SecutirtGroupId);

282:
283: error_tracking_num :=2030;
284: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFNSCW-SCP',l_SecutirtGroupId);
285: IF (l_String <> 'OK') THEN
286: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFPCMN-SCP', l_SecutirtGroupId);
287: IF (l_String <> 'OK') THEN
288: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSC_ORG_FNDRSRUN_LAUNCH_SCP',l_SecutirtGroupId);
289: IF (l_String <> 'OK') THEN
290: Status := l_String;

Line 288: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSC_ORG_FNDRSRUN_LAUNCH_SCP',l_SecutirtGroupId);

284: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFNSCW-SCP',l_SecutirtGroupId);
285: IF (l_String <> 'OK') THEN
286: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFPCMN-SCP', l_SecutirtGroupId);
287: IF (l_String <> 'OK') THEN
288: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSC_ORG_FNDRSRUN_LAUNCH_SCP',l_SecutirtGroupId);
289: IF (l_String <> 'OK') THEN
290: Status := l_String;
291: RETURN;
292: END IF;

Line 334: msc_ws_common.validate_user_resp(l_val_result, userid, responsibilityid);

330:
331: BEGIN
332: req_id := REQTBLTYP();
333: error_tracking_num :=2010;
334: msc_ws_common.validate_user_resp(l_val_result, userid, responsibilityid);
335:
336: IF(l_val_result <> 'OK') THEN
337: status := l_val_result;
338: RETURN;

Line 432: MSC_WS_COMMON.GET_PERMISSION_IDS(l_String, userid, respid, l_SecutirtGroupId, UserName, RespName, RespApplName, SecurityGroupName, Language);

428: BEGIN
429:
430: req_id := REQTBLTYP();
431: error_tracking_num :=2010;
432: MSC_WS_COMMON.GET_PERMISSION_IDS(l_String, userid, respid, l_SecutirtGroupId, UserName, RespName, RespApplName, SecurityGroupName, Language);
433: IF (l_String <> 'OK') THEN
434: Status := l_String;
435: RETURN;
436: END IF;

Line 439: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFNSCW-SCP',l_SecutirtGroupId);

435: RETURN;
436: END IF;
437:
438: error_tracking_num :=2030;
439: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFNSCW-SCP',l_SecutirtGroupId);
440: IF (l_String <> 'OK') THEN
441: Status := l_String;
442: RETURN;
443: END IF;

Line 461: -- 00021 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.VALIDATE_PLAN_ID

457: --
458: -- Un-handled exceptions generate error tokens in the
459: -- format of ERROR_UNEXPECTED_#####.
460: -- The possible values are:
461: -- 00021 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.VALIDATE_PLAN_ID
462: -- 00022 - SET_ASCP_PLAN_OPTIONS/VALIDATE_PLAN_TYPE
463: -- 00023 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.VALIDATE_SIMULATION_SET_ID
464: -- 00024 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_G_DMD_SCH_ID
465: -- 00025 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_CONSUM_LVL (goe)

Line 463: -- 00023 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.VALIDATE_SIMULATION_SET_ID

459: -- format of ERROR_UNEXPECTED_#####.
460: -- The possible values are:
461: -- 00021 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.VALIDATE_PLAN_ID
462: -- 00022 - SET_ASCP_PLAN_OPTIONS/VALIDATE_PLAN_TYPE
463: -- 00023 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.VALIDATE_SIMULATION_SET_ID
464: -- 00024 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_G_DMD_SCH_ID
465: -- 00025 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_CONSUM_LVL (goe)
466: -- 00026 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_CONSUM_LVL (item)
467: -- 00027 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/VALIDATE_L_DMD_SCH_ID

Line 468: -- 00028 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG

464: -- 00024 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_G_DMD_SCH_ID
465: -- 00025 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_CONSUM_LVL (goe)
466: -- 00026 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_CONSUM_LVL (item)
467: -- 00027 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/VALIDATE_L_DMD_SCH_ID
468: -- 00028 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
469: -- 00029 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/VALIDATE_L_SUP_SCH_ID
470: -- 00030 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
471: -- 00031 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.PURGE_ALL_SCHEDULES
472: -- 00032 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.UPDATE_PLAN_OPTIONS

Line 470: -- 00030 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG

466: -- 00026 - SET_ASCP_PLAN_OPTIONS/VALIDATE_GLB_DMD_SCHS/VALIDATE_CONSUM_LVL (item)
467: -- 00027 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/VALIDATE_L_DMD_SCH_ID
468: -- 00028 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
469: -- 00029 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/VALIDATE_L_SUP_SCH_ID
470: -- 00030 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
471: -- 00031 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.PURGE_ALL_SCHEDULES
472: -- 00032 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.UPDATE_PLAN_OPTIONS
473: -- 00033 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_ALL_SCHEDULES
474: -- 00034 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS

Line 471: -- 00031 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.PURGE_ALL_SCHEDULES

467: -- 00027 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/VALIDATE_L_DMD_SCH_ID
468: -- 00028 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
469: -- 00029 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/VALIDATE_L_SUP_SCH_ID
470: -- 00030 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
471: -- 00031 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.PURGE_ALL_SCHEDULES
472: -- 00032 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.UPDATE_PLAN_OPTIONS
473: -- 00033 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_ALL_SCHEDULES
474: -- 00034 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS
475: -- =============================================================

Line 472: -- 00032 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.UPDATE_PLAN_OPTIONS

468: -- 00028 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_DMD_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
469: -- 00029 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/VALIDATE_L_SUP_SCH_ID
470: -- 00030 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
471: -- 00031 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.PURGE_ALL_SCHEDULES
472: -- 00032 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.UPDATE_PLAN_OPTIONS
473: -- 00033 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_ALL_SCHEDULES
474: -- 00034 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS
475: -- =============================================================
476:

Line 473: -- 00033 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_ALL_SCHEDULES

469: -- 00029 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/VALIDATE_L_SUP_SCH_ID
470: -- 00030 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
471: -- 00031 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.PURGE_ALL_SCHEDULES
472: -- 00032 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.UPDATE_PLAN_OPTIONS
473: -- 00033 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_ALL_SCHEDULES
474: -- 00034 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS
475: -- =============================================================
476:
477:

Line 474: -- 00034 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS

470: -- 00030 - SET_ASCP_PLAN_OPTIONS/VALIDATE_LOC_SUP_SCHS/MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG
471: -- 00031 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.PURGE_ALL_SCHEDULES
472: -- 00032 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.UPDATE_PLAN_OPTIONS
473: -- 00033 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_ALL_SCHEDULES
474: -- 00034 - SET_ASCP_PLAN_OPTIONS/MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS
475: -- =============================================================
476:
477:
478:

Line 550: -- MSC_WS_COMMON.

546:
547: -- =============================================================
548: -- Desc: Validate the ship to consumption level. This function is
549: -- used by ASCP only. DRP and SRP have their own function in
550: -- MSC_WS_COMMON.
551: -- Input:
552: -- ShipTo Ship to consumption level.
553: -- SchId Demand schedule id.
554: -- IsLocal Is this ship to consumption level

Line 614: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN

610: -- MSC_SHIP_TO_CS_DC and MSC_SHIP_TO_CZ_DC.
611: IF l_scenario_lvl_item = 40 THEN
612: IF l_scenario_lvl_geo = 11 THEN
613: -- simulate the logic from Record Groups 'MSC_SHIP_TO_CS_ALL'
614: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN
615: IF ShipTo NOT IN (4, 6, 7) THEN -- Item, Customer, Customer Site
616: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
617: END IF;
618: ELSE

Line 635: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN

631: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
632: END IF;
633: ELSIF l_scenario_lvl_geo = 41 THEN
634: -- simulate the logic from Record Groups 'MSC_SHIP_TO_CZ_ALL'
635: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN
636: IF ShipTo NOT IN (4, 6, 8) THEN -- Item, Customer, Zone
637: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
638: END IF;
639: ELSE

Line 652: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN

648: END IF;
649: ELSE
650: -- ???? use the default record group ?????
651: -- simulate the logic from Record Groups 'MSC_SHIP_TO_CS_ALL'
652: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN
653: IF ShipTo NOT IN (4, 6, 7) THEN -- Item, Customer, Customer Site
654: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
655: END IF;
656: ELSE

Line 665: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN

661: END IF;
662: ELSE -- IF l_scenario_lvl_item <> 40 THEN
663: IF l_scenario_lvl_geo = 11 THEN
664: -- simulate the logic from Record Groups 'MSC_SHIP_TO_CS_DC'
665: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN
666: IF ShipTo NOT IN (4, 6, 7, 10) THEN -- Item, Customer, Demand Class, Customer Site
667: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
668: END IF;
669: ELSE

Line 686: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN

682: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
683: END IF;
684: ELSIF l_scenario_lvl_geo = 41 THEN
685: -- simulate the logic from Record Groups 'MSC_SHIP_TO_CZ_DC'
686: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN
687: IF ShipTo NOT IN (4, 6, 8, 10) THEN -- Item', Customer, Zone, Demand Class
688: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
689: END IF;
690: ELSE

Line 703: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN

699: END IF;
700: ELSE
701: -- ???? which record group should I use ?????
702: -- simulate the logic from Record Groups 'MSC_SHIP_TO_CS_DC'
703: IF IsLocal = MSC_WS_COMMON.SYS_YES THEN
704: IF ShipTo NOT IN (4, 6, 7, 10) THEN -- Item, Customer, Demand Class, Customer Site
705: RETURN 'INVALID_SHIP_TO_CONSUMPTION_LVL';
706: END IF;
707: ELSE

Line 749: MSC_WS_COMMON.SYS_NO

745: -- validate ship to consumption level
746: l_String := VALIDATE_CONSUM_LVL(
747: SchTable(I).ShipToConsumptionLvl,
748: SchTable(I).DmdSchId,
749: MSC_WS_COMMON.SYS_NO
750: );
751: IF (l_String <> 'OK') THEN
752: RETURN 'INVALID_GLOBALDMDSCHS_SHP_TO_CONSUMPTION_LVL';
753: END IF;

Line 913: l_ReturnString := MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG(l_OrgInsId, SchTable(I).OrgId, PlanId);

909: FOR I IN SchTable.first..SchTable.last
910: LOOP
911: -- validate organization id
912: BEGIN
913: l_ReturnString := MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG(l_OrgInsId, SchTable(I).OrgId, PlanId);
914: IF (l_ReturnString <> 'OK') THEN
915: -- overwrite the error token here.
916: RETURN 'INVALID_LOCALDMDSCHS_ORGID';
917: END IF;

Line 946: MSC_WS_COMMON.SYS_YES

942: END IF;
943: l_ReturnString := VALIDATE_CONSUM_LVL(
944: SchTable(I).ShipToConsumptionLvl,
945: SchTable(I).DmdSchId,
946: MSC_WS_COMMON.SYS_YES
947: );
948: IF (l_ReturnString <> 'OK') THEN
949: RETURN 'INVALID_LOCALDMDSCHS_SHP_TO_CONSUMPTION_LVL';
950: END IF;

Line 964: l_IncTgtDmd := MSC_WS_COMMON.BOOL_TO_NUMBER(SchTable(I).IncludeTargetDmd);

960: END IF;
961: END IF;
962:
963: IF l_DesigType = 8 THEN
964: l_IncTgtDmd := MSC_WS_COMMON.BOOL_TO_NUMBER(SchTable(I).IncludeTargetDmd);
965: l_IntPlantFlg := 2; -- ignore user input, use default which is unchecked
966: ELSE
967: l_IncTgtDmd := 2; -- ignore user input, use default which is unchecked
968: l_IntPlantFlg := MSC_WS_COMMON.BOOL_TO_NUMBER(SchTable(I).InterPlantFlg);

Line 968: l_IntPlantFlg := MSC_WS_COMMON.BOOL_TO_NUMBER(SchTable(I).InterPlantFlg);

964: l_IncTgtDmd := MSC_WS_COMMON.BOOL_TO_NUMBER(SchTable(I).IncludeTargetDmd);
965: l_IntPlantFlg := 2; -- ignore user input, use default which is unchecked
966: ELSE
967: l_IncTgtDmd := 2; -- ignore user input, use default which is unchecked
968: l_IntPlantFlg := MSC_WS_COMMON.BOOL_TO_NUMBER(SchTable(I).InterPlantFlg);
969: END IF;
970:
971: g_ILocDmdSchTbl.extend;
972: g_ILocDmdSchTbl(g_ILocDmdSchTbl.COUNT) :=

Line 1072: l_ReturnString := MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG(l_OrgInsId, SchTable(I).OrgId, PlanId);

1068: FOR I IN SchTable.first..SchTable.last
1069: LOOP
1070: -- validate organization id
1071: BEGIN
1072: l_ReturnString := MSC_WS_COMMON.PLAN_CONTAINS_THIS_ORG(l_OrgInsId, SchTable(I).OrgId, PlanId);
1073: IF (l_ReturnString <> 'OK') THEN
1074: -- overwrite the error token here.
1075: RETURN 'INVALID_LOCALSUPSCHS_ORGID';
1076: END IF;

Line 1195: MSC_WS_COMMON.VALIDATE_USER_RESP(l_String, UserId, ResponsibilityId);

1191: g_ILocSupSchTbl := MscILocSupSchTbl();
1192:
1193:
1194: -- check user id and responsibility
1195: MSC_WS_COMMON.VALIDATE_USER_RESP(l_String, UserId, ResponsibilityId);
1196: IF (l_String <> 'OK') THEN
1197: Status := l_String;
1198: RETURN;
1199: END IF;

Line 1203: l_String := MSC_WS_COMMON.VALIDATE_PLAN_ID(l_OrgId, l_InsId, l_PlanName, PlanId);

1199: END IF;
1200:
1201: -- check plan id
1202: BEGIN
1203: l_String := MSC_WS_COMMON.VALIDATE_PLAN_ID(l_OrgId, l_InsId, l_PlanName, PlanId);
1204: IF (l_String <> 'OK') THEN
1205: Status := l_String;
1206: RETURN;
1207: END IF;

Line 1222: l_String := MSC_WS_COMMON.VALIDATE_SIMULATION_SET_ID(ItemSimulationSetId);

1218: END IF;
1219:
1220: -- validate item simulation set id
1221: BEGIN
1222: l_String := MSC_WS_COMMON.VALIDATE_SIMULATION_SET_ID(ItemSimulationSetId);
1223: IF (l_String <> 'OK') THEN
1224: Status := l_String;
1225: RETURN;
1226: END IF;

Line 1233: l_Overwrite := MSC_WS_COMMON.CONVERT_OVERWRITE(Overwrite);

1229: raise;
1230: END;
1231:
1232: -- Overwrite is restricted to 'All', 'Outside PTF' or 'None' by xsd.
1233: l_Overwrite := MSC_WS_COMMON.CONVERT_OVERWRITE(Overwrite);
1234:
1235: -- validate global demand schedules
1236: l_String := VALIDATE_GLB_DMD_SCHS(GlobalDmdSchs, l_PlanName);
1237: IF (l_String <> 'OK') THEN

Line 1258: IF MSC_WS_COMMON.BOOL_TO_NUMBER(PurgeAllSchsFlag) = MSC_UTIL.SYS_YES THEN

1254: END IF;
1255:
1256: -- if PurgeAllSchsFlag is set, purge all global demand schedules,
1257: -- local demand schedule and local supply schedules
1258: IF MSC_WS_COMMON.BOOL_TO_NUMBER(PurgeAllSchsFlag) = MSC_UTIL.SYS_YES THEN
1259: BEGIN
1260: MSC_WS_COMMON.PURGE_ALL_SCHEDULES(PlanId);
1261: EXCEPTION WHEN others THEN
1262: g_ErrorCode := 'ERROR_UNEXPECTED_00031';

Line 1260: MSC_WS_COMMON.PURGE_ALL_SCHEDULES(PlanId);

1256: -- if PurgeAllSchsFlag is set, purge all global demand schedules,
1257: -- local demand schedule and local supply schedules
1258: IF MSC_WS_COMMON.BOOL_TO_NUMBER(PurgeAllSchsFlag) = MSC_UTIL.SYS_YES THEN
1259: BEGIN
1260: MSC_WS_COMMON.PURGE_ALL_SCHEDULES(PlanId);
1261: EXCEPTION WHEN others THEN
1262: g_ErrorCode := 'ERROR_UNEXPECTED_00031';
1263: raise;
1264: END;

Line 1269: MSC_WS_COMMON.UPDATE_PLAN_OPTIONS(PlanId, ItemSimulationSetId, l_Overwrite);

1265: END IF;
1266:
1267: -- update item simulation set and overwrite
1268: BEGIN
1269: MSC_WS_COMMON.UPDATE_PLAN_OPTIONS(PlanId, ItemSimulationSetId, l_Overwrite);
1270: EXCEPTION WHEN others THEN
1271: g_ErrorCode := 'ERROR_UNEXPECTED_00032';
1272: raise;
1273: END;

Line 1276: IF MSC_WS_COMMON.BOOL_TO_NUMBER(PurgeAllSchsFlag) = MSC_UTIL.SYS_YES THEN

1272: raise;
1273: END;
1274:
1275: -- set all global/local demand/supply schedules
1276: IF MSC_WS_COMMON.BOOL_TO_NUMBER(PurgeAllSchsFlag) = MSC_UTIL.SYS_YES THEN
1277: BEGIN
1278: l_String := MSC_WS_COMMON.INSERT_ALL_SCHEDULES(
1279: PlanId, l_InsId, UserId,
1280: g_IGlbDmdSchTbl, g_ILocDmdSchTbl, g_ILocSupSchTbl);

Line 1278: l_String := MSC_WS_COMMON.INSERT_ALL_SCHEDULES(

1274:
1275: -- set all global/local demand/supply schedules
1276: IF MSC_WS_COMMON.BOOL_TO_NUMBER(PurgeAllSchsFlag) = MSC_UTIL.SYS_YES THEN
1277: BEGIN
1278: l_String := MSC_WS_COMMON.INSERT_ALL_SCHEDULES(
1279: PlanId, l_InsId, UserId,
1280: g_IGlbDmdSchTbl, g_ILocDmdSchTbl, g_ILocSupSchTbl);
1281: EXCEPTION WHEN others THEN
1282: g_ErrorCode := 'ERROR_UNEXPECTED_00033';

Line 1287: l_String := MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS(

1283: raise;
1284: END;
1285: ELSE
1286: BEGIN
1287: l_String := MSC_WS_COMMON.INSERT_OR_UPDATE_ALL_SCHS(
1288: PlanId, l_InsId, UserId,
1289: g_IGlbDmdSchTbl, g_ILocDmdSchTbl, g_ILocSupSchTbl);
1290: EXCEPTION WHEN others THEN
1291: g_ErrorCode := 'ERROR_UNEXPECTED_00034';

Line 1335: MSC_WS_COMMON.GET_PERMISSION_IDS(l_String, userid, respid, l_SecutirtGroupId, UserName, RespName, RespApplName, SecurityGroupName, Language);

1331: error_tracking_num number;
1332: l_SecutirtGroupId NUMBER;
1333: BEGIN
1334: error_tracking_num :=2010;
1335: MSC_WS_COMMON.GET_PERMISSION_IDS(l_String, userid, respid, l_SecutirtGroupId, UserName, RespName, RespApplName, SecurityGroupName, Language);
1336: IF (l_String <> 'OK') THEN
1337: Status := l_String;
1338: RETURN;
1339: END IF;

Line 1342: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFPPMR-SCP',l_SecutirtGroupId);

1338: RETURN;
1339: END IF;
1340:
1341: error_tracking_num :=2030;
1342: MSC_WS_COMMON.VALIDATE_USER_RESP_FUNC(l_String, userid, respid, 'MSCFPPMR-SCP',l_SecutirtGroupId);
1343: IF (l_String <> 'OK') THEN
1344: Status := l_String;
1345: RETURN;
1346: END IF;